CVE Vulnerabilities

CVE-2024-30386

Use After Free

Published: Apr 12, 2024 | Modified: May 16, 2024
CVSS 3.x
N/A
Source:
NVD
CVSS 2.x
RedHat/V2
RedHat/V3
Ubuntu

A Use-After-Free vulnerability in the Layer 2 Address Learning Daemon (l2ald)

of Juniper Networks Junos OS and Junos OS Evolved allows an unauthenticated, adjacent attacker to cause l2ald to crash leading to a Denial-of-Service (DoS).

In an EVPN-VXLAN scenario, when

state updates are received and processed by the affected system, the correct order of some processing steps is not ensured, which can lead to an l2ald crash and restart. Whether the crash occurs depends on system internal timing which is outside the attackers control. This issue affects:

Junos OS: 

  • All versions before 20.4R3-S8,
  • 21.2 versions before 21.2R3-S6,
  • 21.3 versions before 21.3R3-S5,
  • 21.4 versions before 21.4R3-S4,
  • 22.1 versions before 22.1R3-S3,
  • 22.2 versions before 22.2R3-S1,
  • 22.3 versions before 22.3R3,,
  • 22.4 versions before 22.4R2;

Junos OS Evolved: 

  • All versions before 20.4R3-S8-EVO,
  • 21.2-EVO versions before 21.2R3-S6-EVO, 
  • 21.3-EVO

versions before 21.3R3-S5-EVO,

  • 21.4-EVO

versions before 21.4R3-S4-EVO,

  • 22.1-EVO

versions before 22.1R3-S3-EVO,

  • 22.2-EVO

versions before 22.2R3-S1-EVO,

  • 22.3-EVO

versions before 22.3R3-EVO,

  • 22.4-EVO

versions before 22.4R2-EVO.

Weakness

Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code.

Extended Description

The use of previously-freed memory can have any number of adverse consequences, ranging from the corruption of valid data to the execution of arbitrary code, depending on the instantiation and timing of the flaw. The simplest way data corruption may occur involves the system’s reuse of the freed memory. Use-after-free errors have two common and sometimes overlapping causes:

In this scenario, the memory in question is allocated to another pointer validly at some point after it has been freed. The original pointer to the freed memory is used again and points to somewhere within the new allocation. As the data is changed, it corrupts the validly used memory; this induces undefined behavior in the process. If the newly allocated data happens to hold a class, in C++ for example, various function pointers may be scattered within the heap data. If one of these function pointers is overwritten with an address to valid shellcode, execution of arbitrary code can be achieved.

Potential Mitigations

References