CVE Vulnerabilities

CVE-2020-1900

Use After Free

Published: Mar 11, 2021 | Modified: Nov 21, 2024
CVSS 3.x
9.8
CRITICAL
Source:
NVD
CVSS:3.1/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
LOW

When unserializing an object with dynamic properties HHVM needs to pre-reserve the full size of the dynamic property array before inserting anything into it. Otherwise the array might resize, invalidating previously stored references. This pre-reservation was not occurring in HHVM prior to v4.32.3, between versions 4.33.0 and 4.56.0, 4.57.0, 4.58.0, 4.58.1, 4.59.0, 4.60.0, 4.61.0, 4.62.0.

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
Hhvm Facebook * 4.32.3 (excluding)
Hhvm Facebook 4.33.0 (including) 4.56.1 (excluding)
Hhvm Facebook 4.57.0 (including) 4.57.0 (including)
Hhvm Facebook 4.58.0 (including) 4.58.0 (including)
Hhvm Facebook 4.58.1 (including) 4.58.1 (including)
Hhvm Facebook 4.59.0 (including) 4.59.0 (including)
Hhvm Facebook 4.60.0 (including) 4.60.0 (including)
Hhvm Facebook 4.61.0 (including) 4.61.0 (including)
Hhvm Facebook 4.62.0 (including) 4.62.0 (including)
Hhvm Ubuntu bionic *
Hhvm Ubuntu trusty *
Hhvm Ubuntu xenial *

Potential Mitigations

References