CVE Vulnerabilities

CVE-2018-0001

Use After Free

Published: Jan 10, 2018 | Modified: Feb 23, 2018
CVSS 3.x
9.8
CRITICAL
Source:
NVD
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 2.x
7.5 HIGH
AV:N/AC:L/Au:N/C:P/I:P/A:P
RedHat/V2
RedHat/V3
Ubuntu

A remote, unauthenticated attacker may be able to execute code by exploiting a use-after-free defect found in older versions of PHP through injection of crafted data via specific PHP URLs within the context of the J-Web process. Affected releases are Juniper Networks Junos OS: 12.1X46 versions prior to 12.1X46-D67; 12.3 versions prior to 12.3R12-S5; 12.3X48 versions prior to 12.3X48-D35; 14.1 versions prior to 14.1R8-S5, 14.1R9; 14.1X53 versions prior to 14.1X53-D44, 14.1X53-D50; 14.2 versions prior to 14.2R7-S7, 14.2R8; 15.1 versions prior to 15.1R3; 15.1X49 versions prior to 15.1X49-D30; 15.1X53 versions prior to 15.1X53-D70.

Weakness

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

Affected Software

Name Vendor Start Version End Version
Junos Juniper 12.1x46-d10 (including) 12.1x46-d10 (including)
Junos Juniper 12.1x46-d15 (including) 12.1x46-d15 (including)
Junos Juniper 12.1x46-d20 (including) 12.1x46-d20 (including)
Junos Juniper 12.1x46-d25 (including) 12.1x46-d25 (including)
Junos Juniper 12.1x46-d30 (including) 12.1x46-d30 (including)
Junos Juniper 12.1x46-d35 (including) 12.1x46-d35 (including)
Junos Juniper 12.1x46-d40 (including) 12.1x46-d40 (including)
Junos Juniper 12.1x46-d45 (including) 12.1x46-d45 (including)
Junos Juniper 12.1x46-d50 (including) 12.1x46-d50 (including)
Junos Juniper 12.1x46-d55 (including) 12.1x46-d55 (including)
Junos Juniper 12.1x46-d60 (including) 12.1x46-d60 (including)
Junos Juniper 12.1x46-d65 (including) 12.1x46-d65 (including)

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