Chromium Bug Hunting Adventures 03 - Reproducing CVE-2024-5839
What is CVE-2024-5839?
CVE-2024-5839 was the first publicly acknowledged bug report to bypass Chrome’s MiraclePtr
defense via a use-after-free (UAF) vulnerability. It is worth noting that this vulnerability was patched in Chromium version 126.0.6478.54.
Since 2022, the Chromium team has invested heavily in UAF mitigations via MiraclePtr
. Many historical UAFs involved raw pointers, prompting Chromium to introduce MiraclePtr
in their custom memory allocator PartitionAlloc
. Among multiple MiraclePtr
implementations, Google selected BackupRefPtr
to mitigate the exploitability of UAF vulnerabilities, which is enabled in non-ASAN release builds.