CVE Vulnerabilities

CVE-2020-24240

Use After Free

Published: Aug 25, 2020 | Modified: Nov 21, 2024
CVSS 3.x
5.5
MEDIUM
Source:
NVD
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
CVSS 2.x
7.1 HIGH
AV:N/AC:M/Au:N/C:N/I:N/A:C
RedHat/V2
RedHat/V3
5.5 MODERATE
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Ubuntu
LOW

GNU Bison before 3.7.1 has a use-after-free in _obstack_free in lib/obstack.c (called from gram_lex) when a 0 byte is encountered. NOTE: there is a risk only if Bison is used with untrusted input, and the observed bug happens to cause unsafe behavior with a specific compiler/architecture. The bug report was intended to show that a crash may occur in Bison itself, not that a crash may occur in code that is generated by Bison.

Weakness

The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory “belongs” to the code that operates on the new pointer.

Affected Software

Name Vendor Start Version End Version
Bison Gnu 3.7 (including) 3.7 (including)
Bison Ubuntu bionic *
Bison Ubuntu esm-infra/bionic *
Bison Ubuntu esm-infra/focal *
Bison Ubuntu esm-infra/xenial *
Bison Ubuntu focal *
Bison Ubuntu groovy *
Bison Ubuntu hirsute *
Bison Ubuntu impish *
Bison Ubuntu jammy *
Bison Ubuntu kinetic *
Bison Ubuntu trusty *
Bison Ubuntu upstream *
Bison Ubuntu xenial *

Potential Mitigations

References