CVE Vulnerabilities

CVE-2021-0236

Improper Check for Unusual or Exceptional Conditions

Published: Apr 22, 2021 | Modified: Apr 27, 2021
CVSS 3.x
N/A
Source:
NVD
CVSS 2.x
6.8 MEDIUM
AV:N/AC:L/Au:S/C:N/I:N/A:C
RedHat/V2
RedHat/V3
Ubuntu

Due to an improper check for unusual or exceptional conditions in Juniper Networks Junos OS and Junos OS Evolved the Routing Protocol Daemon (RPD) service, upon receipt of a specific matching BGP packet meeting a specific term in the flowspec configuration, crashes and restarts causing a Denial of Service (DoS). Continued receipt and processing of this packet will create a sustained Denial of Service (DoS) condition. This issue affects only Multiprotocol BGP (MP-BGP) VPNv6 FlowSpec deployments. This issue affects: Juniper Networks Junos OS: 18.4 versions prior to 18.4R1-S8, 18.4R2-S7, 18.4R3-S7; 19.1 versions prior to 19.1R2-S2, 19.1R3-S4; 19.2 versions prior to 19.2R1-S6, 19.2R3-S2; 19.3 versions prior to 19.3R3-S2; 19.4 versions prior to 19.4R2-S4, 19.4R3-S1; 20.1 versions prior to 20.1R2, 20.1R3; 20.2 versions prior to 20.2R2, 20.2R3; 20.3 versions prior to 20.3R1-S1, 20.3R2. Juniper Networks Junos OS Evolved: All versions after 18.4R1-EVO prior to 20.3R2-EVO. This issue does not affect: Juniper Networks Junos OS versions prior to 18.4R1. Juniper Networks Junos OS Evolved versions prior to 18.4R1-EVO.

Weakness

The product does not check or incorrectly checks for unusual or exceptional conditions that are not expected to occur frequently during day to day operation of the product.

Affected Software

Name Vendor Start Version End Version
Junos Juniper 18.4 18.4
Junos Juniper 18.4 18.4
Junos Juniper 18.4 18.4
Junos Juniper 18.4 18.4
Junos Juniper 18.4 18.4
Junos Juniper 18.4 18.4
Junos Juniper 18.4 18.4
Junos Juniper 18.4 18.4
Junos Juniper 18.4 18.4
Junos Juniper 18.4 18.4
Junos Juniper 18.4 18.4
Junos Juniper 18.4 18.4
Junos Juniper 18.4 18.4
Junos Juniper 18.4 18.4
Junos Juniper 18.4 18.4
Junos Juniper 18.4 18.4
Junos Juniper 18.4 18.4
Junos Juniper 18.4 18.4
Junos Juniper 18.4 18.4
Junos Juniper 18.4 18.4
Junos Juniper 18.4 18.4
Junos Juniper 18.4 18.4
Junos Juniper 18.4 18.4
Junos Juniper 19.1 19.1
Junos Juniper 19.1 19.1
Junos Juniper 19.1 19.1
Junos Juniper 19.1 19.1
Junos Juniper 19.1 19.1
Junos Juniper 19.1 19.1
Junos Juniper 19.1 19.1
Junos Juniper 19.1 19.1
Junos Juniper 19.1 19.1
Junos Juniper 19.1 19.1
Junos Juniper 19.1 19.1
Junos Juniper 19.1 19.1
Junos Juniper 19.1 19.1
Junos Juniper 19.2 19.2
Junos Juniper 19.2 19.2
Junos Juniper 19.2 19.2
Junos Juniper 19.2 19.2
Junos Juniper 19.2 19.2
Junos Juniper 19.2 19.2
Junos Juniper 19.2 19.2
Junos Juniper 19.2 19.2
Junos Juniper 19.2 19.2
Junos Juniper 19.2 19.2
Junos Juniper 19.2 19.2
Junos Juniper 19.3 19.3
Junos Juniper 19.3 19.3
Junos Juniper 19.3 19.3
Junos Juniper 19.3 19.3
Junos Juniper 19.3 19.3
Junos Juniper 19.3 19.3
Junos Juniper 19.3 19.3
Junos Juniper 19.3 19.3
Junos Juniper 19.3 19.3
Junos Juniper 19.3 19.3
Junos Juniper 19.4 19.4
Junos Juniper 19.4 19.4
Junos Juniper 19.4 19.4
Junos Juniper 19.4 19.4
Junos Juniper 19.4 19.4
Junos Juniper 19.4 19.4
Junos Juniper 19.4 19.4
Junos Juniper 19.4 19.4
Junos Juniper 20.1 20.1
Junos Juniper 20.1 20.1
Junos Juniper 20.1 20.1
Junos Juniper 20.1 20.1
Junos Juniper 20.1 20.1
Junos Juniper 20.2 20.2
Junos Juniper 20.2 20.2
Junos Juniper 20.2 20.2
Junos Juniper 20.2 20.2
Junos Juniper 20.3 20.3
Junos_os_evolved Juniper 19.1 19.1
Junos_os_evolved Juniper 19.1 19.1
Junos_os_evolved Juniper 19.2 19.2
Junos_os_evolved Juniper 19.2 19.2
Junos_os_evolved Juniper 19.3 19.3
Junos_os_evolved Juniper 19.3 19.3
Junos_os_evolved Juniper 20.1 20.1

Extended Description

The programmer may assume that certain events or conditions will never occur or do not need to be worried about, such as low memory conditions, lack of access to resources due to restrictive permissions, or misbehaving clients or components. However, attackers may intentionally trigger these unusual conditions, thus violating the programmer’s assumptions, possibly introducing instability, incorrect behavior, or a vulnerability. Note that this entry is not exclusively about the use of exceptions and exception handling, which are mechanisms for both checking and handling unusual or unexpected conditions.

Potential Mitigations

  • Use a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid.
  • Choose languages with features such as exception handling that force the programmer to anticipate unusual conditions that may generate exceptions. Custom exceptions may need to be developed to handle unusual business-logic conditions. Be careful not to pass sensitive exceptions back to the user (CWE-209, CWE-248).
  • Ensure that error messages only contain minimal details that are useful to the intended audience and no one else. The messages need to strike the balance between being too cryptic (which can confuse users) or being too detailed (which may reveal more than intended). The messages should not reveal the methods that were used to determine the error. Attackers can use detailed information to refine or optimize their original attack, thereby increasing their chances of success.
  • If errors must be captured in some detail, record them in log messages, but consider what could occur if the log messages can be viewed by attackers. Highly sensitive information such as passwords should never be saved to log files.
  • Avoid inconsistent messaging that might accidentally tip off an attacker about internal state, such as whether a user account exists or not.
  • Exposing additional information to a potential attacker in the context of an exceptional condition can help the attacker determine what attack vectors are most likely to succeed beyond DoS.
  • Assume all input is malicious. Use an “accept known good” input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.
  • When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, “boat” may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as “red” or “blue.”
  • Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code’s environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.

References