CVE Vulnerabilities

CVE-2022-22211

Allocation of Resources Without Limits or Throttling

Published: Oct 18, 2022 | Modified: Oct 21, 2022
CVSS 3.x
N/A
Source:
NVD
CVSS 2.x
RedHat/V2
RedHat/V3
Ubuntu

A limitless resource allocation vulnerability in FPC resources of Juniper Networks Junos OS Evolved on PTX Series allows an unprivileged attacker to cause Denial of Service (DoS). Continuously polling the SNMP jnxCosQstatTable causes the FPC to run out of GUID space, causing a Denial of Service to the FPC resources. When the FPC runs out of the GUID space, you will see the following syslog messages. The evo-aftmand-bt process is asserting. fpc1 evo-aftmand-bt[17556]: %USER-3: get_next_guid: Ran out of Guid Space start 1748051689472 end 1752346656767 fpc1 audit[17556]: %AUTH-5: ANOM_ABEND auid=4294967295 uid=0 gid=0 ses=4294967295 pid=17556 comm=EvoAftManBt-mai exe=/usr/sbin/evo-aftmand-bt sig=6 fpc1 kernel: %KERN-5: audit: type=1701 audit(1648567505.119:57): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=17556 comm=EvoAftManBt-mai exe=/usr/sbin/evo-aftmand-bt sig=6 fpc1 emfd-fpa[14438]: %USER-5: Alarm set: APP color=red, class=CHASSIS, reason=Application evo-aftmand-bt fail on node Fpc1 fpc1 emfd-fpa[14438]: %USER-3-EMF_FPA_ALARM_REP: RaiseAlarm: Alarm(Location: /Chassis[0]/Fpc[1] Module: sysman Object: evo-aftmand-bt:0 Error: 2) reported fpc1 sysepochman[12738]: %USER-5-SYSTEM_REBOOT_EVENT: Reboot [node] [ungraceful reboot] [evo-aftmand-bt exited] The FPC resources can be monitored using the following commands: user@router> start shell [vrf:none] user@router-re0:~$ cli -c show platform application-info allocations app evo-aftmand-bt | grep ^fpc | grep -v Route | grep -i -v Nexthop | awk {total[$1] += $5} END { for (key in total) { print key total[key]/4294967296 }} Once the FPCs become unreachable they must be manually restarted as they do not self-recover. This issue affects Juniper Networks Junos OS Evolved on PTX Series: All versions prior to 20.4R3-S4-EVO; 21.1-EVO version 21.1R1-EVO and later versions; 21.2-EVO version 21.2R1-EVO and later versions; 21.3-EVO versions prior to 21.3R3-EVO; 21.4-EVO versions prior to 21.4R2-EVO; 22.1-EVO versions prior to 22.1R2-EVO.

Weakness

The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.

Affected Software

Name Vendor Start Version End Version
Junos_os_evolved Juniper * 20.4 (excluding)
Junos_os_evolved Juniper 20.4 (including) 20.4 (including)
Junos_os_evolved Juniper 20.4-r1 (including) 20.4-r1 (including)
Junos_os_evolved Juniper 20.4-r1-s1 (including) 20.4-r1-s1 (including)
Junos_os_evolved Juniper 20.4-r1-s2 (including) 20.4-r1-s2 (including)
Junos_os_evolved Juniper 20.4-r2 (including) 20.4-r2 (including)
Junos_os_evolved Juniper 20.4-r2-s1 (including) 20.4-r2-s1 (including)
Junos_os_evolved Juniper 20.4-r2-s2 (including) 20.4-r2-s2 (including)
Junos_os_evolved Juniper 20.4-r2-s3 (including) 20.4-r2-s3 (including)
Junos_os_evolved Juniper 20.4-r3 (including) 20.4-r3 (including)
Junos_os_evolved Juniper 20.4-r3-s1 (including) 20.4-r3-s1 (including)
Junos_os_evolved Juniper 20.4-r3-s2 (including) 20.4-r3-s2 (including)
Junos_os_evolved Juniper 20.4-r3-s3 (including) 20.4-r3-s3 (including)
Junos_os_evolved Juniper 21.1 (including) 21.1 (including)
Junos_os_evolved Juniper 21.1-r1 (including) 21.1-r1 (including)
Junos_os_evolved Juniper 21.1-r1-s1 (including) 21.1-r1-s1 (including)
Junos_os_evolved Juniper 21.1-r2 (including) 21.1-r2 (including)
Junos_os_evolved Juniper 21.1-r3 (including) 21.1-r3 (including)
Junos_os_evolved Juniper 21.1-r3-s1 (including) 21.1-r3-s1 (including)
Junos_os_evolved Juniper 21.2 (including) 21.2 (including)
Junos_os_evolved Juniper 21.2-r1 (including) 21.2-r1 (including)
Junos_os_evolved Juniper 21.2-r1-s1 (including) 21.2-r1-s1 (including)
Junos_os_evolved Juniper 21.2-r1-s2 (including) 21.2-r1-s2 (including)
Junos_os_evolved Juniper 21.2-r2 (including) 21.2-r2 (including)
Junos_os_evolved Juniper 21.2-r2-s1 (including) 21.2-r2-s1 (including)
Junos_os_evolved Juniper 21.2-r2-s2 (including) 21.2-r2-s2 (including)
Junos_os_evolved Juniper 21.2-r3 (including) 21.2-r3 (including)
Junos_os_evolved Juniper 21.3 (including) 21.3 (including)
Junos_os_evolved Juniper 21.3-r1 (including) 21.3-r1 (including)
Junos_os_evolved Juniper 21.3-r1-s1 (including) 21.3-r1-s1 (including)
Junos_os_evolved Juniper 21.3-r2 (including) 21.3-r2 (including)
Junos_os_evolved Juniper 21.3-r2-s1 (including) 21.3-r2-s1 (including)
Junos_os_evolved Juniper 21.3-r2-s2 (including) 21.3-r2-s2 (including)
Junos_os_evolved Juniper 21.4 (including) 21.4 (including)
Junos_os_evolved Juniper 21.4-r1 (including) 21.4-r1 (including)
Junos_os_evolved Juniper 21.4-r1-s1 (including) 21.4-r1-s1 (including)
Junos_os_evolved Juniper 21.4-r1-s2 (including) 21.4-r1-s2 (including)
Junos_os_evolved Juniper 22.1-r1 (including) 22.1-r1 (including)
Junos_os_evolved Juniper 22.1-r1-s1 (including) 22.1-r1-s1 (including)
Junos_os_evolved Juniper 22.1-r1-s2 (including) 22.1-r1-s2 (including)

Extended Description

Code frequently has to work with limited resources, so programmers must be careful to ensure that resources are not consumed too quickly, or too easily. Without use of quotas, resource limits, or other protection mechanisms, it can be easy for an attacker to consume many resources by rapidly making many requests, or causing larger resources to be used than is needed. When too many resources are allocated, or if a single resource is too large, then it can prevent the code from working correctly, possibly leading to a denial of service.

Potential Mitigations

  • 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.

  • Mitigation of resource exhaustion attacks requires that the target system either:

  • The first of these solutions is an issue in itself though, since it may allow attackers to prevent the use of the system by a particular valid user. If the attacker impersonates the valid user, they may be able to prevent the user from accessing the server in question.

  • The second solution can be difficult to effectively institute – and even when properly done, it does not provide a full solution. It simply requires more resources on the part of the attacker.

  • If the program must fail, ensure that it fails gracefully (fails closed). There may be a temptation to simply let the program fail poorly in cases such as low memory conditions, but an attacker may be able to assert control before the software has fully exited. Alternately, an uncontrolled failure could cause cascading problems with other downstream components; for example, the program could send a signal to a downstream process so the process immediately knows that a problem has occurred and has a better chance of recovery.

  • Ensure that all failures in resource allocation place the system into a safe posture.

  • Use resource-limiting settings provided by the operating system or environment. For example, when managing system resources in POSIX, setrlimit() can be used to set limits for certain types of resources, and getrlimit() can determine how many resources are available. However, these functions are not available on all operating systems.

  • When the current levels get close to the maximum that is defined for the application (see CWE-770), then limit the allocation of further resources to privileged users; alternately, begin releasing resources for less-privileged users. While this mitigation may protect the system from attack, it will not necessarily stop attackers from adversely impacting other users.

  • Ensure that the application performs the appropriate error checks and error handling in case resources become unavailable (CWE-703).

References