Use after free in Accessibility (CVE-2024-3171)
A use-after-free vulnerability exists in Chrome's accessibility feature when recording and enabling web accessibility. An attacker could potentially exploit this to cause a crash or execute arbitrary code, though MiraclePtr currently makes it non-exploitable.
- Fix shipped in 2 months
VULNERABILITY DETAILS
Please provide a brief explanation of the security issue.
VERSION
Chrome Version: gs://chromium-browser-asan/linux-debug/asan-linux-debug-1236152.zip
Operating System: ubuntu 2204
REPRODUCTION CASE
- launch chrome
- go to chrome://accessibility/
- click 'Start Recording' button
- click 'Web Accessibility' checkbox
FOR CRASHES, PLEASE INCLUDE THE FOLLOWING ADDITIONAL INFORMATION
asan log
=================================================================
==92476==ERROR: AddressSanitizer: heap-use-after-free on address 0x5130000f76c0 at pc 0x7f39a63a7ecf bp 0x7fff8d67b690 sp 0x7fff8d67b688
READ of size 1 at 0x5130000f76c0 thread T0 (chrome)
==92476==WARNING: invalid path to external symbolizer!
==92476==WARNING: Failed to use and restart external symbolizer!
#0 0x7f39a63a7ece (/home/ttt/asan/libbase.so+0xba7ece) (BuildId: 2ea62f5ae37135e0)
#1 0x7f39a63a794f (/home/ttt/asan/libbase.so+0xba794f) (BuildId: 2ea62f5ae37135e0)
#2 0x7f39511b150f (/home/ttt/asan/libaccessibility_platform.so+0x5b150f) (BuildId: 03371261e9965fb1)
#3 0x7f39511b14c9 (/home/ttt/asan/libaccessibility_platform.so+0x5b14c9) (BuildId: 03371261e9965fb1)
#4 0x7f39511aac54 (/home/ttt/asan/libaccessibility_platform.so+0x5aac54) (BuildId: 03371261e9965fb1)
#5 0x7f39511a5dda (/home/ttt/asan/libaccessibility_platform.so+0x5a5dda) (BuildId: 03371261e9965fb1)
#6 0x7f39511a5758 (/home/ttt/asan/libaccessibility_platform.so+0x5a5758) (BuildId: 03371261e9965fb1)
#7 0x7f392c0929ce (/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x309ce) (BuildId: 7c47809b4e688382aab4127a2e07496450c5e6b0)
0x5130000f76c0 is located 0 bytes inside of 368-byte region [0x5130000f76c0,0x5130000f7830)
freed by thread T0 (chrome) here:
#0 0x55e916a5936d (/home/ttt/asan/chrome+0xcc3636d) (BuildId: 1873399a7f82f58a)
#1 0x7f39916ab7a1 (/home/ttt/asan/libcontent.so+0xfeab7a1) (BuildId: 9dcb118d5a6da423)
#2 0x7f398fa84a92 (/home/ttt/asan/libcontent.so+0xe284a92) (BuildId: 9dcb118d5a6da423)
#3 0x7f398f9bb24f (/home/ttt/asan/libcontent.so+0xe1bb24f) (BuildId: 9dcb118d5a6da423)
#4 0x7f398f972c66 (/home/ttt/asan/libcontent.so+0xe172c66) (BuildId: 9dcb118d5a6da423)
#5 0x7f398f8e39b5 (/home/ttt/asan/libcontent.so+0xe0e39b5) (BuildId: 9dcb118d5a6da423)
#6 0x7f398f8e1e4f (/home/ttt/asan/libcontent.so+0xe0e1e4f) (BuildId: 9dcb118d5a6da423)
#7 0x7f398f7ceee8 (/home/ttt/asan/libcontent.so+0xdfceee8) (BuildId: 9dcb118d5a6da423)
#8 0x7f398f8f33ce (/home/ttt/asan/libcontent.so+0xe0f33ce) (BuildId: 9dcb118d5a6da423)
#9 0x7f398f8ee8d9 (/home/ttt/asan/libcontent.so+0xe0ee8d9) (BuildId: 9dcb118d5a6da423)
#10 0x7f398fa5c182 (/home/ttt/asan/libcontent.so+0xe25c182) (BuildId: 9dcb118d5a6da423)
#11 0x7f398fa5bdd0 (/home/ttt/asan/libcontent.so+0xe25bdd0) (BuildId: 9dcb118d5a6da423)
#12 0x7f398fa5b9a5 (/home/ttt/asan/libcontent.so+0xe25b9a5) (BuildId: 9dcb118d5a6da423)
#13 0x7f398fa5b7f8 (/home/ttt/asan/libcontent.so+0xe25b7f8) (BuildId: 9dcb118d5a6da423)
#14 0x7f39893e440e (/home/ttt/asan/libcontent.so+0x7be440e) (BuildId: 9dcb118d5a6da423)
#15 0x7f39893d7ee4 (/home/ttt/asan/libcontent.so+0x7bd7ee4) (BuildId: 9dcb118d5a6da423)
#16 0x7f3999f2246e (/home/ttt/asan/libmojo_public_cpp_bindings.so+0x12246e) (BuildId: 7af4b8f1c9110ade)
#17 0x7f3999f20e28 (/home/ttt/asan/libmojo_public_cpp_bindings.so+0x120e28) (BuildId: 7af4b8f1c9110ade)
#18 0x7f3999f6c8db (/home/ttt/asan/libmojo_public_cpp_bindings.so+0x16c8db) (BuildId: 7af4b8f1c9110ade)
#19 0x7f3999f2827c (/home/ttt/asan/libmojo_public_cpp_bindings.so+0x12827c) (BuildId: 7af4b8f1c9110ade)
#20 0x7f397db7b9e1 (/home/ttt/asan/libipc.so+0x17b9e1) (BuildId: 06b96c6bc00843bd)
#21 0x7f397db80c39 (/home/ttt/asan/libipc.so+0x180c39) (BuildId: 06b96c6bc00843bd)
#22 0x7f397db80938 (/home/ttt/asan/libipc.so+0x180938) (BuildId: 06b96c6bc00843bd)
#23 0x7f397db8059e (/home/ttt/asan/libipc.so+0x18059e) (BuildId: 06b96c6bc00843bd)
#24 0x7f397db803e8 (/home/ttt/asan/libipc.so+0x1803e8) (BuildId: 06b96c6bc00843bd)
#25 0x7f39a6206cc4 (/home/ttt/asan/libbase.so+0xa06cc4) (BuildId: 2ea62f5ae37135e0)
#26 0x7f39a6806560 (/home/ttt/asan/libbase.so+0x1006560) (BuildId: 2ea62f5ae37135e0)
#27 0x7f39a69405e5 (/home/ttt/asan/libbase.so+0x11405e5) (BuildId: 2ea62f5ae37135e0)
#28 0x7f39a693f06e (/home/ttt/asan/libbase.so+0x113f06e) (BuildId: 2ea62f5ae37135e0)
#29 0x7f39a693d274 (/home/ttt/asan/libbase.so+0x113d274) (BuildId: 2ea62f5ae37135e0)
previously allocated by thread T0 (chrome) here:
#0 0x55e916a58b0d (/home/ttt/asan/chrome+0xcc35b0d) (BuildId: 1873399a7f82f58a)
#1 0x7f39916aad8c (/home/ttt/asan/libcontent.so+0xfeaad8c) (BuildId: 9dcb118d5a6da423)
#2 0x7f398f9145b3 (/home/ttt/asan/libcontent.so+0xe1145b3) (BuildId: 9dcb118d5a6da423)
#3 0x7f3990d1ca48 (/home/ttt/asan/libcontent.so+0xf51ca48) (BuildId: 9dcb118d5a6da423)
#4 0x7f3990d1a2ae (/home/ttt/asan/libcontent.so+0xf51a2ae) (BuildId: 9dcb118d5a6da423)
#5 0x55e9257ecab7 (/home/ttt/asan/chrome+0x1b9c9ab7) (BuildId: 1873399a7f82f58a)
#6 0x55e9257f6898 (/home/ttt/asan/chrome+0x1b9d3898) (BuildId: 1873399a7f82f58a)
#7 0x55e9257f6492 (/home/ttt/asan/chrome+0x1b9d3492) (BuildId: 1873399a7f82f58a)
#8 0x55e9257f6144 (/home/ttt/asan/chrome+0x1b9d3144) (BuildId: 1873399a7f82f58a)
#9 0x55e9257f5fc0 (/home/ttt/asan/chrome+0x1b9d2fc0) (BuildId: 1873399a7f82f58a)
#10 0x7f399138600c (/home/ttt/asan/libcontent.so+0xfb8600c) (BuildId: 9dcb118d5a6da423)
#11 0x7f3991383d36 (/home/ttt/asan/libcontent.so+0xfb83d36) (BuildId: 9dcb118d5a6da423)
#12 0x7f39913812d1 (/home/ttt/asan/libcontent.so+0xfb812d1) (BuildId: 9dcb118d5a6da423)
#13 0x7f39894c072e (/home/ttt/asan/libcontent.so+0x7cc072e) (BuildId: 9dcb118d5a6da423)
#14 0x7f399138cc94 (/home/ttt/asan/libcontent.so+0xfb8cc94) (BuildId: 9dcb118d5a6da423)
#15 0x7f3999f22626 (/home/ttt/asan/libmojo_public_cpp_bindings.so+0x122626) (BuildId: 7af4b8f1c9110ade)
#16 0x7f3999f20e28 (/home/ttt/asan/libmojo_public_cpp_bindings.so+0x120e28) (BuildId: 7af4b8f1c9110ade)
#17 0x7f3999f6c8db (/home/ttt/asan/libmojo_public_cpp_bindings.so+0x16c8db) (BuildId: 7af4b8f1c9110ade)
#18 0x7f3999f2827c (/home/ttt/asan/libmojo_public_cpp_bindings.so+0x12827c) (BuildId: 7af4b8f1c9110ade)
#19 0x7f397db7b9e1 (/home/ttt/asan/libipc.so+0x17b9e1) (BuildId: 06b96c6bc00843bd)
#20 0x7f397db80c39 (/home/ttt/asan/libipc.so+0x180c39) (BuildId: 06b96c6bc00843bd)
#21 0x7f397db80938 (/home/ttt/asan/libipc.so+0x180938) (BuildId: 06b96c6bc00843bd)
#22 0x7f397db8059e (/home/ttt/asan/libipc.so+0x18059e) (BuildId: 06b96c6bc00843bd)
#23 0x7f397db803e8 (/home/ttt/asan/libipc.so+0x1803e8) (BuildId: 06b96c6bc00843bd)
#24 0x7f39a6206cc4 (/home/ttt/asan/libbase.so+0xa06cc4) (BuildId: 2ea62f5ae37135e0)
#25 0x7f39a6806560 (/home/ttt/asan/libbase.so+0x1006560) (BuildId: 2ea62f5ae37135e0)
#26 0x7f39a69405e5 (/home/ttt/asan/libbase.so+0x11405e5) (BuildId: 2ea62f5ae37135e0)
#27 0x7f39a693f06e (/home/ttt/asan/libbase.so+0x113f06e) (BuildId: 2ea62f5ae37135e0)
#28 0x7f39a693d274 (/home/ttt/asan/libbase.so+0x113d274) (BuildId: 2ea62f5ae37135e0)
#29 0x7f39a693f642 (/home/ttt/asan/libbase.so+0x113f642) (BuildId: 2ea62f5ae37135e0)
SUMMARY: AddressSanitizer: heap-use-after-free (/home/ttt/asan/libbase.so+0xba7ece) (BuildId: 2ea62f5ae37135e0)
Shadow bytes around the buggy address:
0x5130000f7400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x5130000f7480: 00 00 00 00 00 00 00 00 fa fa fa fa fa fa f7 fa
0x5130000f7500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x5130000f7580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x5130000f7600: 00 00 00 00 00 00 00 00 00 00 00 00 fa fa fa fa
=>0x5130000f7680: fa fa fa fa fa fa f7 fa[fd]fd fd fd fd fd fd fd
0x5130000f7700: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x5130000f7780: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x5130000f7800: fd fd fd fd fd fd fa fa fa fa fa fa fa fa f7 fa
0x5130000f7880: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x5130000f7900: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==92476==ADDITIONAL INFO
==92476==Note: Please include this section with the ASan report.
Task trace:
#0 0x7f398b17b5c9 (/home/ttt/asan/libcontent.so+0x997b5c9) (BuildId: 9dcb118d5a6da423)
#1 0x7f399b9a4e30 (/home/ttt/asan/libmojo_public_system_cpp.so+0x92e30) (BuildId: b4bd78ec7327a291)
#2 0x7f398f953f38 (/home/ttt/asan/libcontent.so+0xe153f38) (BuildId: 9dcb118d5a6da423)
#3 0x7f399b9aa5eb (/home/ttt/asan/libmojo_public_system_cpp.so+0x985eb) (BuildId: b4bd78ec7327a291)
MiraclePtr Status: PROTECTED
This crash occurred while a raw_ptr<T> object containing a dangling pointer was being dereferenced.
MiraclePtr is expected to make this crash non-exploitable once fully enabled.
Refer to https://chromium.googlesource.com/chromium/src/+/main/base/memory/raw_ptr.md for details.
==92476==END OF ADDITIONAL INFO
==92476==ABORTING
Context
This is a Chrome Vulnerability Reward Program (Chrome VRP) report for a use-after-free in Chrome's Accessibility code, tracked as CVE-2024-3171. The affected component is the accessibility platform layer, and the report was disclosed on 20 February 2024 with a medium severity rating and a bounty of 1,000 USD. The researcher is credited as ttt.
The feature involved is the internal chrome://accessibility/ page. That page is a debugging surface built into Chrome: it lists the accessibility trees Chrome is maintaining and lets a developer or tester start recording accessibility events and toggle which accessibility modes are active. In normal use it is a diagnostic tool, not something an ordinary user visits, but it drives the same accessibility plumbing that assistive technology relies on.
The bug is a heap-use-after-free: a 368-byte heap region is freed, and then a single byte inside it is read. The read happens on the main thread (T0) inside libbase.so, with the call stack passing through libaccessibility_platform.so and into libgobject-2.0.so, which is the GLib object system used by the Linux accessibility stack.
Setup
The report gives a minimal environment:
- Chrome build:
gs://chromium-browser-asan/linux-debug/asan-linux-debug-1236152.zip, an AddressSanitizer debug build for Linux. - Operating system: Ubuntu 22.04 (
ubuntu 2204). - Tooling: AddressSanitizer, whose output is included in full in the report.
No accounts, roles or special permissions are involved. The only precondition is the ability to open the internal chrome://accessibility/ page, which is available in a normal Chrome session.
Finding it
The researcher does not describe how the bug was first suspected; the report goes straight to a deterministic reproduction. What makes it interesting is that the trigger is entirely UI-driven: starting accessibility event recording and then enabling the Web Accessibility mode is enough to free an object that is still referenced and then dereference it. The crash is reported by AddressSanitizer as a heap-use-after-free with a one-byte read.
Exploitation
Step 1: launch Chrome
Start the ASan debug build of Chrome on Ubuntu 22.04.
Step 2: open the accessibility internals page
Navigate to:
chrome://accessibility/
This is the internal page that exposes Chrome's accessibility state and controls.
Step 3: start recording
Click the Start Recording button. This puts the page into a mode where accessibility events are recorded, which means the accessibility platform layer begins tracking and reporting activity.
Step 4: enable Web Accessibility
Click the Web Accessibility checkbox. This toggles the web accessibility mode on, which changes which accessibility trees Chrome maintains and how they are exposed to the platform layer.
At this point AddressSanitizer aborts with a heap-use-after-free. The relevant part of the log:
==92476==ERROR: AddressSanitizer: heap-use-after-free on address 0x5130000f76c0 at pc 0x7f39a63a7ecf bp 0x7fff8d67b690 sp 0x7fff8d67b688
READ of size 1 at 0x5130000f76c0 thread T0 (chrome)
The faulting access is a one-byte read at 0x5130000f76c0 on thread T0. The read stack shows the access coming out of libbase.so and then libaccessibility_platform.so, ending in libgobject-2.0.so:
#0 0x7f39a63a7ece (/home/ttt/asan/libbase.so+0xba7ece) (BuildId: 2ea62f5ae37135e0)
#1 0x7f39a63a794f (/home/ttt/asan/libbase.so+0xba794f) (BuildId: 2ea62f5ae37135e0)
#2 0x7f39511b150f (/home/ttt/asan/libaccessibility_platform.so+0x5b150f) (BuildId: 03371261e9965fb1)
#3 0x7f39511b14c9 (/home/ttt/asan/libaccessibility_platform.so+0x5b14c9) (BuildId: 03371261e9965fb1)
#4 0x7f39511aac54 (/home/ttt/asan/libaccessibility_platform.so+0x5aac54) (BuildId: 03371261e9965fb1)
#5 0x7f39511a5dda (/home/ttt/asan/libaccessibility_platform.so+0x5a5dda) (BuildId: 03371261e9965fb1)
#6 0x7f39511a5758 (/home/ttt/asan/libaccessibility_platform.so+0x5a5758) (BuildId: 03371261e9965fb1)
#7 0x7f392c0929ce (/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x309ce) (BuildId: [redacted])
The freed region is 368 bytes, and the read lands at offset zero inside it:
0x5130000f76c0 is located 0 bytes inside of 368-byte region [0x5130000f76c0,0x5130000f7830)
The free stack shows the object being released from libcontent.so, with the allocation and free both on thread T0:
freed by thread T0 (chrome) here:
#0 0x55e916a5936d (/home/ttt/asan/chrome+0xcc3636d) (BuildId: 1873399a7f82f58a)
#1 0x7f39916ab7a1 (/home/ttt/asan/libcontent.so+0xfeab7a1) (BuildId: 9dcb118d5a6da423)
#2 0x7f398fa84a92 (/home/ttt/asan/libcontent.so+0xe284a92) (BuildId: 9dcb118d5a6da423)
#3 0x7f398f9bb24f (/home/ttt/asan/libcontent.so+0xe1bb24f) (BuildId: 9dcb118d5a6da423)
#4 0x7f398f972c66 (/home/ttt/asan/libcontent.so+0xe172c66) (BuildId: 9dcb118d5a6da423)
#5 0x7f398f8e39b5 (/home/ttt/asan/libcontent.so+0xe0e39b5) (BuildId: 9dcb118d5a6da423)
#6 0x7f398f8e1e4f (/home/ttt/asan/libcontent.so+0xe0e1e4f) (BuildId: 9dcb118d5a6da423)
#7 0x7f398f7ceee8 (/home/ttt/asan/libcontent.so+0xdfceee8) (BuildId: 9dcb118d5a6da423)
#8 0x7f398f8f33ce (/home/ttt/asan/libcontent.so+0xe0f33ce) (BuildId: 9dcb118d5a6da423)
#9 0x7f398f8ee8d9 (/home/ttt/asan/libcontent.so+0xe0ee8d9) (BuildId: 9dcb118d5a6da423)
#10 0x7f398fa5c182 (/home/ttt/asan/libcontent.so+0xe25c182) (BuildId: 9dcb118d5a6da423)
#11 0x7f398fa5bdd0 (/home/ttt/asan/libcontent.so+0xe25bdd0) (BuildId: 9dcb118d5a6da423)
#12 0x7f398fa5b9a5 (/home/ttt/asan/libcontent.so+0xe25b9a5) (BuildId: 9dcb118d5a6da423)
#13 0x7f398fa5b7f8 (/home/ttt/asan/libcontent.so+0xe25b7f8) (BuildId: 9dcb118d5a6da423)
#14 0x7f39893e440e (/home/ttt/asan/libcontent.so+0x7be440e) (BuildId: 9dcb118d5a6da423)
#15 0x7f39893d7ee4 (/home/ttt/asan/libcontent.so+0x7bd7ee4) (BuildId: 9dcb118d5a6da423)
#16 0x7f3999f2246e (/home/ttt/asan/libmojo_public_cpp_bindings.so+0x12246e) (BuildId: 7af4b8f1c9110ade)
#17 0x7f3999f20e28 (/home/ttt/asan/libmojo_public_cpp_bindings.so+0x120e28) (BuildId: 7af4b8f1c9110ade)
#18 0x7f3999f6c8db (/home/ttt/asan/libmojo_public_cpp_bindings.so+0x16c8db) (BuildId: 7af4b8f1c9110ade)
#19 0x7f3999f2827c (/home/ttt/asan/libmojo_public_cpp_bindings.so+0x12827c) (BuildId: 7af4b8f1c9110ade)
#20 0x7f397db7b9e1 (/home/ttt/asan/libipc.so+0x17b9e1) (BuildId: 06b96c6bc00843bd)
#21 0x7f397db80c39 (/home/ttt/asan/libipc.so+0x180c39) (BuildId: 06b96c6bc00843bd)
#22 0x7f397db80938 (/home/ttt/asan/libipc.so+0x180938) (BuildId: 06b96c6bc00843bd)
#23 0x7f397db8059e (/home/ttt/asan/libipc.so+0x18059e) (BuildId: 06b96c6bc00843bd)
#24 0x7f397db803e8 (/home/ttt/asan/libipc.so+0x1803e8) (BuildId: 06b96c6bc00843bd)
#25 0x7f39a6206cc4 (/home/ttt/asan/libbase.so+0xa06cc4) (BuildId: 2ea62f5ae37135e0)
#26 0x7f39a6806560 (/home/ttt/asan/libbase.so+0x1006560) (BuildId: 2ea62f5ae37135e0)
#27 0x7f39a69405e5 (/home/ttt/asan/libbase.so+0x11405e5) (BuildId: 2ea62f5ae37135e0)
#28 0x7f39a693f06e (/home/ttt/asan/libbase.so+0x113f06e) (BuildId: 2ea62f5ae37135e0)
#29 0x7f39a693d274 (/home/ttt/asan/libbase.so+0x113d274) (BuildId: 2ea62f5ae37135e0)
The allocation stack shows the same region being created earlier, again on T0, with the allocation going through libcontent.so and chrome:
previously allocated by thread T0 (chrome) here:
#0 0x55e916a58b0d (/home/ttt/asan/chrome+0xcc35b0d) (BuildId: 1873399a7f82f58a)
#1 0x7f39916aad8c (/home/ttt/asan/libcontent.so+0xfeaad8c) (BuildId: 9dcb118d5a6da423)
#2 0x7f398f9145b3 (/home/ttt/asan/libcontent.so+0xe1145b3) (BuildId: 9dcb118d5a6da423)
#3 0x7f3990d1ca48 (/home/ttt/asan/libcontent.so+0xf51ca48) (BuildId: 9dcb118d5a6da423)
#4 0x7f3990d1a2ae (/home/ttt/asan/libcontent.so+0xf51a2ae) (BuildId: 9dcb118d5a6da423)
#5 0x55e9257ecab7 (/home/ttt/asan/chrome+0x1b9c9ab7) (BuildId: 1873399a7f82f58a)
#6 0x55e9257f6898 (/home/ttt/asan/chrome+0x1b9d3898) (BuildId: 1873399a7f82f58a)
#7 0x55e9257f6492 (/home/ttt/asan/chrome+0x1b9d3492) (BuildId: 1873399a7f82f58a)
#8 0x55e9257f6144 (/home/ttt/asan/chrome+0x1b9d3144) (BuildId: 1873399a7f82f58a)
#9 0x55e9257f5fc0 (/home/ttt/asan/chrome+0x1b9d2fc0) (BuildId: 1873399a7f82f58a)
#10 0x7f399138600c (/home/ttt/asan/libcontent.so+0xfb8600c) (BuildId: 9dcb118d5a6da423)
#11 0x7f3991383d36 (/home/ttt/asan/libcontent.so+0xfb83d36) (BuildId: 9dcb118d5a6da423)
#12 0x7f39913812d1 (/home/ttt/asan/libcontent.so+0xfb812d1) (BuildId: 9dcb118d5a6da423)
#13 0x7f39894c072e (/home/ttt/asan/libcontent.so+0x7cc072e) (BuildId: 9dcb118d5a6da423)
#14 0x7f399138cc94 (/home/ttt/asan/libcontent.so+0xfb8cc94) (BuildId: 9dcb118d5a6da423)
#15 0x7f3999f22626 (/home/ttt/asan/libmojo_public_cpp_bindings.so+0x122626) (BuildId: 7af4b8f1c9110ade)
#16 0x7f3999f20e28 (/home/ttt/asan/libmojo_public_cpp_bindings.so+0x120e28) (BuildId: 7af4b8f1c9110ade)
#17 0x7f3999f6c8db (/home/ttt/asan/libmojo_public_cpp_bindings.so+0x16c8db) (BuildId: 7af4b8f1c9110ade)
#18 0x7f3999f2827c (/home/ttt/asan/libmojo_public_cpp_bindings.so+0x12827c) (BuildId: 7af4b8f1c9110ade)
#19 0x7f397db7b9e1 (/home/ttt/asan/libipc.so+0x17b9e1) (BuildId: 06b96c6bc00843bd)
#20 0x7f397db80c39 (/home/ttt/asan/libipc.so+0x180c39) (BuildId: 06b96c6bc00843bd)
#21 0x7f397db80938 (/home/ttt/asan/libipc.so+0x180938) (BuildId: 06b96c6bc00843bd)
#22 0x7f397db8059e (/home/ttt/asan/libipc.so+0x18059e) (BuildId: 06b96c6bc00843bd)
#23 0x7f397db803e8 (/home/ttt/asan/libipc.so+0x1803e8) (BuildId: 06b96c6bc00843bd)
#24 0x7f39a6206cc4 (/home/ttt/asan/libbase.so+0xa06cc4) (BuildId: 2ea62f5ae37135e0)
#25 0x7f39a6806560 (/home/ttt/asan/libbase.so+0x1006560) (BuildId: 2ea62f5ae37135e0)
#26 0x7f39a69405e5 (/home/ttt/asan/libbase.so+0x11405e5) (BuildId: 2ea62f5ae37135e0)
#27 0x7f39a693f06e (/home/ttt/asan/libbase.so+0x113f06e) (BuildId: 2ea62f5ae37135e0)
#28 0x7f39a693d274 (/home/ttt/asan/libbase.so+0x113d274) (BuildId: 2ea62f5ae37135e0)
#29 0x7f39a693f642 (/home/ttt/asan/libbase.so+0x113f642) (BuildId: 2ea62f5ae37135e0)
The summary line names the faulting library:
SUMMARY: AddressSanitizer: heap-use-after-free (/home/ttt/asan/libbase.so+0xba7ece) (BuildId: 2ea62f5ae37135e0)
The shadow memory dump confirms the region is marked as freed (fd) at the faulting address, with redzones (fa) around it:
Shadow bytes around the buggy address:
0x5130000f7400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x5130000f7480: 00 00 00 00 00 00 00 00 fa fa fa fa fa fa f7 fa
0x5130000f7500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x5130000f7580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x5130000f7600: 00 00 00 00 00 00 00 00 00 00 00 00 fa fa fa fa
=>0x5130000f7680: fa fa fa fa fa fa f7 fa[fd]fd fd fd fd fd fd fd
0x5130000f7700: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x5130000f7780: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x5130000f7800: fd fd fd fd fd fd fa fa fa fa fa fa fa fa f7 fa
0x5130000f7880: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x5130000f7900: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
The report also includes the task trace attached to the ASan output:
Task trace:
#0 0x7f398b17b5c9 (/home/ttt/asan/libcontent.so+0x997b5c9) (BuildId: 9dcb118d5a6da423)
#1 0x7f399b9a4e30 (/home/ttt/asan/libmojo_public_system_cpp.so+0x92e30) (BuildId: b4bd78ec7327a291)
#2 0x7f398f953f38 (/home/ttt/asan/libcontent.so+0xe153f38) (BuildId: 9dcb118d5a6da423)
#3 0x7f399b9aa5eb (/home/ttt/asan/libmojo_public_system_cpp.so+0x985eb) (BuildId: b4bd78ec7327a291)
Root cause
The report itself does not analyse the code path; it provides the reproduction and the ASan evidence. What the evidence shows is that an object of 368 bytes is allocated on the main thread, later freed on the same thread through libcontent.so, and then read one byte at a time from offset zero while the accessibility platform layer is active. The read stack passes through libaccessibility_platform.so and into GLib's object system, which is consistent with the accessibility platform layer holding a reference to an object that the content layer has already released. In other words, the lifetime of the accessibility object is not correctly tied to the platform layer's use of it: the free happens first, and the platform layer dereferences the stale pointer afterwards. The exact ownership mistake is not described in the report.
The report does include the MiraclePtr status, which is relevant to why the crash was caught and how exploitable it is:
MiraclePtr Status: PROTECTED
This crash occurred while a raw_ptr<T> object containing a dangling pointer was being dereferenced.
MiraclePtr is expected to make this crash non-exploitable once fully enabled.
Refer to https://chromium.googlesource.com/chromium/src/+/main/base/memory/raw_ptr.md for details.
So the dangling pointer was held in a raw_ptr<T>, and MiraclePtr was in a state where it protected the access. The report states that MiraclePtr is expected to make this crash non-exploitable once fully enabled.
Impact
The report does not describe an exploitation scenario. The observable effect is an AddressSanitizer abort on the main thread, triggered by interacting with chrome://accessibility/. The severity assigned by the program is medium, with a bounty of 1,000 USD. Because the dangling pointer was held in a raw_ptr<T> and MiraclePtr was active for this access, the report notes that the crash is expected to be non-exploitable once MiraclePtr is fully enabled. Any impact beyond denial of service would depend on that protection being incomplete, which the report does not demonstrate.
Fix
What it does establish is the condition that must be addressed: the accessibility platform layer must not dereference an object after the content layer has freed it, so the object's lifetime needs to be extended for as long as the platform layer holds a reference, or the reference must be invalidated when the object is freed. The report also notes that fully enabling MiraclePtr is expected to make this crash non-exploitable, which is a mitigation rather than a fix for the lifetime bug itself.
Variants to test
- Toggle accessibility modes in the opposite order on
chrome://accessibility/: enable Web Accessibility first, then start recording. A positive result is an ASan heap-use-after-free report with a similar read stack throughlibaccessibility_platform.so. - Start recording, enable Web Accessibility, then disable it again while recording continues. A positive result is a use-after-free on the same 368-byte object or on a related accessibility object.
- Repeat the start/stop recording cycle several times with Web Accessibility toggled in between. A positive result is a crash whose free stack still goes through
libcontent.soand whose read stack still enters the platform layer. - Run the same sequence with a page loaded that has a large accessibility tree, so that more accessibility objects are alive when the mode changes. A positive result is the same class of crash with a different allocation site.
- On other Chromium-based builds, check whether the same sequence produces a crash when MiraclePtr is disabled or not fully enabled. A positive result is a use-after-free that is not reported as
MiraclePtr Status: PROTECTED.
What happened, in plain words
A security researcher found a bug in Google Chrome, the web browser. The bug is in a part of Chrome called Accessibility. Accessibility is the set of features that help people with disabilities use the browser: for example, a screen reader that reads a page aloud, or a tool that lets someone navigate with a keyboard instead of a mouse. Chrome keeps an internal model of every page (a tree of elements) so that these assistive tools can ask questions about what is on screen.
The bug is a specific kind of programming mistake called a use-after-free. To understand it, imagine you borrow a library book, write down its shelf number on a sticky note, return the book, and then later walk to that shelf and try to read the book. The shelf number is still written on your note, but the book is gone. If someone else has put a different book there, you might read the wrong thing. In a program, memory is borrowed (allocated), given back (freed), and then sometimes still used through an old reference (a pointer). That is a use-after-free.
In this case, a small block of memory (368 bytes) was freed, and then one byte inside it was read. A special debugging tool called AddressSanitizer, built into the test version of Chrome, noticed the mistake immediately and stopped the browser with a detailed report. The researcher triggered the bug with nothing more than a few clicks on an internal Chrome page. The bug was given the identifier CVE-2024-3171, rated medium severity, and paid a bounty of 1,000 USD through the Chrome Vulnerability Reward Program. The researcher is credited as ttt.
Context
This report was filed with the Chrome Vulnerability Reward Program (Chrome VRP). That is Google's scheme for paying people who find and report security bugs in Chrome. Each accepted report gets a tracking number called a CVE (Common Vulnerabilities and Exposures), which is a public label so that everyone can refer to the same bug. This one is CVE-2024-3171.
The affected component is the accessibility platform layer. Chrome is not one giant program: it is built from many libraries, each a bundle of code with a specific job. The accessibility platform layer is the part that connects Chrome's internal accessibility information to the operating system's accessibility services, so that screen readers and similar tools can use it.
The report was disclosed on 20 February 2024, rated medium severity, with a bounty of 1,000 USD.
The feature involved is an internal page, chrome://accessibility/. Chrome has a number of these chrome:// pages that ordinary users rarely see. They are debugging surfaces: pages built into the browser that show internal state and let a developer or tester flip switches. The accessibility page lists the accessibility trees Chrome is maintaining (the internal models of pages) and lets you start recording accessibility events and toggle which accessibility modes are active. In normal use it is a diagnostic tool, but it drives the same accessibility plumbing that assistive technology relies on, which is why a bug reachable from it matters.
The bug is a heap-use-after-free. The heap is the area of memory a program uses for objects it creates while running, as opposed to the stack, which is used for short-lived function calls. A 368-byte heap region is freed, and then a single byte inside it is read. The read happens on the main thread, labelled T0 in the log, inside a library called libbase.so. The call stack (the chain of function calls that led to the read) passes through libaccessibility_platform.so and into libgobject-2.0.so, which is the GLib object system used by the Linux accessibility stack. GLib is a general-purpose library that many Linux programs share.
Setup
The report gives a minimal environment:
- Chrome build:
gs://chromium-browser-asan/linux-debug/asan-linux-debug-1236152.zip, an AddressSanitizer debug build for Linux. - Operating system: Ubuntu 22.04 (
ubuntu 2204). - Tooling: AddressSanitizer, whose output is included in full in the report.
A few of those terms deserve a plain explanation. A build is a compiled copy of a program. A debug build is one compiled with extra checks and information, slower but much better at catching mistakes. AddressSanitizer (often shortened to ASan) is a tool that watches every memory access a program makes and shouts immediately if the program reads or writes memory it should not. The gs:// prefix means the file lives in Google Cloud Storage, a place to store files online.
No accounts, roles or special permissions are involved. The only precondition is the ability to open the internal chrome://accessibility/ page, which is available in a normal Chrome session.
Finding it
The researcher does not describe how the bug was first suspected; the report goes straight to a deterministic reproduction. Deterministic means the same steps produce the same result every time, which is exactly what a good bug report needs.
What makes it interesting is that the trigger is entirely UI-driven. UI means user interface: the buttons, checkboxes and menus a person clicks. Starting accessibility event recording and then enabling the Web Accessibility mode is enough to free an object that is still referenced and then dereference it. To dereference a pointer means to follow it and use the thing it points at. If the thing has already been freed, that is the use-after-free.
The crash is reported by AddressSanitizer as a heap-use-after-free with a one-byte read. A flag is a tiny value, often just on or off, stored in a single byte.
Exploitation
Exploitation here means walking through the steps that trigger the bug. The word does not imply that the researcher turned it into an attack; it is simply the sequence of actions.
Step 1: launch Chrome
Start the ASan debug build of Chrome on Ubuntu 22.04. You use the special instrumented build because it reports the memory error in detail.
Step 2: open the accessibility internals page
Navigate to:
chrome://accessibility/
This is the internal page that exposes Chrome's accessibility state and controls. Typing a chrome:// address in the address bar is how you reach these built-in pages. The page is not a website on the internet; it is generated by the browser itself.
Step 3: start recording
Click the Start Recording button. This puts the page into a mode where accessibility events are recorded, which means the accessibility platform layer begins tracking and reporting activity. Think of it as turning on a flight recorder: from now on, the accessibility system writes down what happens.
Step 4: enable Web Accessibility
Click the Web Accessibility checkbox. This toggles the web accessibility mode on, which changes which accessibility trees Chrome maintains and how they are exposed to the platform layer. A checkbox is a small box you click to switch a setting on or off. Changing this mode is the step after which the crash occurs.
At this point AddressSanitizer aborts with a heap-use-after-free. The relevant part of the log:
==92476==ERROR: AddressSanitizer: heap-use-after-free on address 0x5130000f76c0 at pc 0x7f39a63a7ecf bp 0x7fff8d67b690 sp 0x7fff8d67b688
READ of size 1 at 0x5130000f76c0 thread T0 (chrome)
Line by line:
==92476==ERROR: AddressSanitizer: heap-use-after-freesays the tool caught a use-after-free. The number 92476 is the process identifier, a number the operating system gives each running program.on address 0x5130000f76c0is the memory address involved. Memory addresses are like house numbers for bytes in memory.at pc 0x7f39a63a7ecf bp 0x7fff8d67b690 sp 0x7fff8d67b688gives the program counter (pc, where the code was executing), the base pointer (bp) and the stack pointer (sp), which are low-level bookkeeping values.READ of size 1means the program tried to read one byte.thread T0 (chrome)means this happened on the main thread, the one that runs the browser's main work.
The faulting access is a one-byte read at 0x5130000f76c0 on thread T0. The read stack shows the access coming out of libbase.so and then libaccessibility_platform.so, ending in libgobject-2.0.so:
#0 0x7f39a63a7ece (/home/ttt/asan/libbase.so+0xba7ece) (BuildId: 2ea62f5ae37135e0)
#1 0x7f39a63a794f (/home/ttt/asan/libbase.so+0xba794f) (BuildId: 2ea62f5ae37135e0)
#2 0x7f39511b150f (/home/ttt/asan/libaccessibility_platform.so+0x5b150f) (BuildId: 03371261e9965fb1)
#3 0x7f39511b14c9 (/home/ttt/asan/libaccessibility_platform.so+0x5b14c9) (BuildId: 03371261e9965fb1)
#4 0x7f39511aac54 (/home/ttt/asan/libaccessibility_platform.so+0x5aac54) (BuildId: 03371261e9965fb1)
#5 0x7f39511a5dda (/home/ttt/asan/libaccessibility_platform.so+0x5a5dda) (BuildId: 03371261e9965fb1)
#6 0x7f39511a5758 (/home/ttt/asan/libaccessibility_platform.so+0x5a5758) (BuildId: 03371261e9965fb1)
#7 0x7f392c0929ce (/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x309ce) (BuildId: [redacted])
Each line is one frame of the call stack, numbered from #0 (the innermost, where the read happened) outwards. The address after the plus sign is an offset into the library, a way of saying where inside that file the code sits. The BuildId is a fingerprint that identifies exactly which compiled version of the library was used. Reading from the bottom up: GLib's object system called into the accessibility platform layer, which called into libbase.so, which performed the one-byte read.
The freed region is 368 bytes, and the read lands at offset zero inside it:
0x5130000f76c0 is located 0 bytes inside of 368-byte region [0x5130000f76c0,0x5130000f7830)
This says the address being read is the very first byte of a block that started at 0x5130000f76c0 and ended just before 0x5130000f7830. The square bracket with a closing parenthesis is a common way to write a range that includes the start but not the end.
The free stack shows the object being released from libcontent.so, with the allocation and free both on thread T0:
freed by thread T0 (chrome) here:
#0 0x55e916a5936d (/home/ttt/asan/chrome+0xcc3636d) (BuildId: 1873399a7f82f58a)
#1 0x7f39916ab7a1 (/home/ttt/asan/libcontent.so+0xfeab7a1) (BuildId: 9dcb118d5a6da423)
#2 0x7f398fa84a92 (/home/ttt/asan/libcontent.so+0xe284a92) (BuildId: 9dcb118d5a6da423)
#3 0x7f398f9bb24f (/home/ttt/asan/libcontent.so+0xe1bb24f) (BuildId: 9dcb118d5a6da423)
#4 0x7f398f972c66 (/home/ttt/asan/libcontent.so+0xe172c66) (BuildId: 9dcb118d5a6da423)
#5 0x7f398f8e39b5 (/home/ttt/asan/libcontent.so+0xe0e39b5) (BuildId: 9dcb118d5a6da423)
#6 0x7f398f8e1e4f (/home/ttt/asan/libcontent.so+0xe0e1e4f) (BuildId: 9dcb118d5a6da423)
#7 0x7f398f7ceee8 (/home/ttt/asan/libcontent.so+0xdfceee8) (BuildId: 9dcb118d5a6da423)
#8 0x7f398f8f33ce (/home/ttt/asan/libcontent.so+0xe0f33ce) (BuildId: 9dcb118d5a6da423)
#9 0x7f398f8ee8d9 (/home/ttt/asan/libcontent.so+0xe0ee8d9) (BuildId: 9dcb118d5a6da423)
#10 0x7f398fa5c182 (/home/ttt/asan/libcontent.so+0xe25c182) (BuildId: 9dcb118d5a6da423)
#11 0x7f398fa5bdd0 (/home/ttt/asan/libcontent.so+0xe25bdd0) (BuildId: 9dcb118d5a6da423)
#12 0x7f398fa5b9a5 (/home/ttt/asan/libcontent.so+0xe25b9a5) (BuildId: 9dcb118d5a6da423)
#13 0x7f398fa5b7f8 (/home/ttt/asan/libcontent.so+0xe25b7f8) (BuildId: 9dcb118d5a6da423)
#14 0x7f39893e440e (/home/ttt/asan/libcontent.so+0x7be440e) (BuildId: 9dcb118d5a6da423)
#15 0x7f39893d7ee4 (/home/ttt/asan/libcontent.so+0x7bd7ee4) (BuildId: 9dcb118d5a6da423)
#16 0x7f3999f2246e (/home/ttt/asan/libmojo_public_cpp_bindings.so+0x12246e) (BuildId: 7af4b8f1c9110ade)
#17 0x7f3999f20e28 (/home/ttt/asan/libmojo_public_cpp_bindings.so+0x120e28) (BuildId: 7af4b8f1c9110ade)
#18 0x7f3999f6c8db (/home/ttt/asan/libmojo_public_cpp_bindings.so+0x16c8db) (BuildId: 7af4b8f1c9110ade)
#19 0x7f3999f2827c (/home/ttt/asan/libmojo_public_cpp_bindings.so+0x12827c) (BuildId: 7af4b8f1c9110ade)
#20 0x7f397db7b9e1 (/home/ttt/asan/libipc.so+0x17b9e1) (BuildId: 06b96c6bc00843bd)
#21 0x7f397db80c39 (/home/ttt/asan/libipc.so+0x180c39) (BuildId: 06b96c6bc00843bd)
#22 0x7f397db80938 (/home/ttt/asan/libipc.so+0x180938) (BuildId: 06b96c6bc00843bd)
#23 0x7f397db8059e (/home/ttt/asan/libipc.so+0x18059e) (BuildId: 06b96c6bc00843bd)
#24 0x7f397db803e8 (/home/ttt/asan/libipc.so+0x1803e8) (BuildId: 06b96c6bc00843bd)
#25 0x7f39a6206cc4 (/home/ttt/asan/libbase.so+0xa06cc4) (BuildId: 2ea62f5ae37135e0)
#26 0x7f39a6806560 (/home/ttt/asan/libbase.so+0x1006560) (BuildId: 2ea62f5ae37135e0)
#27 0x7f39a69405e5 (/home/ttt/asan/libbase.so+0x11405e5) (BuildId: 2ea62f5ae37135e0)
#28 0x7f39a693f06e (/home/ttt/asan/libbase.so+0x113f06e) (BuildId: 2ea62f5ae37135e0)
#29 0x7f39a693d274 (/home/ttt/asan/libbase.so+0x113d274) (BuildId: 2ea62f5ae37135e0)
This is the story of how the memory was given back. The top frame is in the chrome executable itself, and most of the rest are in libcontent.so, the library that handles web content. Further down you see libmojo_public_cpp_bindings.so and libipc.so. Mojo is Chrome's system for sending messages between its internal processes, and IPC stands for inter-process communication, the general idea of separate processes talking to each other. The free stack passes through Mojo and IPC libraries.
The allocation stack shows the same region being created earlier, again on T0, with the allocation going through libcontent.so and chrome:
previously allocated by thread T0 (chrome) here:
#0 0x55e916a58b0d (/home/ttt/asan/chrome+0xcc35b0d) (BuildId: 1873399a7f82f58a)
#1 0x7f39916aad8c (/home/ttt/asan/libcontent.so+0xfeaad8c) (BuildId: 9dcb118d5a6da423)
#2 0x7f398f9145b3 (/home/ttt/asan/libcontent.so+0xe1145b3) (BuildId: 9dcb118d5a6da423)
#3 0x7f3990d1ca48 (/home/ttt/asan/libcontent.so+0xf51ca48) (BuildId: 9dcb118d5a6da423)
#4 0x7f3990d1a2ae (/home/ttt/asan/libcontent.so+0xf51a2ae) (BuildId: 9dcb118d5a6da423)
#5 0x55e9257ecab7 (/home/ttt/asan/chrome+0x1b9c9ab7) (BuildId: 1873399a7f82f58a)
#6 0x55e9257f6898 (/home/ttt/asan/chrome+0x1b9d3898) (BuildId: 1873399a7f82f58a)
#7 0x55e9257f6492 (/home/ttt/asan/chrome+0x1b9d3492) (BuildId: 1873399a7f82f58a)
#8 0x55e9257f6144 (/home/ttt/asan/chrome+0x1b9d3144) (BuildId: 1873399a7f82f58a)
#9 0x55e9257f5fc0 (/home/ttt/asan/chrome+0x1b9d2fc0) (BuildId: 1873399a7f82f58a)
#10 0x7f399138600c (/home/ttt/asan/libcontent.so+0xfb8600c) (BuildId: 9dcb118d5a6da423)
#11 0x7f3991383d36 (/home/ttt/asan/libcontent.so+0xfb83d36) (BuildId: 9dcb118d5a6da423)
#12 0x7f39913812d1 (/home/ttt/asan/libcontent.so+0xfb812d1) (BuildId: 9dcb118d5a6da423)
#13 0x7f39894c072e (/home/ttt/asan/libcontent.so+0x7cc072e) (BuildId: 9dcb118d5a6da423)
#14 0x7f399138cc94 (/home/ttt/asan/libcontent.so+0xfb8cc94) (BuildId: 9dcb118d5a6da423)
#15 0x7f3999f22626 (/home/ttt/asan/libmojo_public_cpp_bindings.so+0x122626) (BuildId: 7af4b8f1c9110ade)
#16 0x7f3999f20e28 (/home/ttt/asan/libmojo_public_cpp_bindings.so+0x120e28) (BuildId: 7af4b8f1c9110ade)
#17 0x7f3999f6c8db (/home/ttt/asan/libmojo_public_cpp_bindings.so+0x16c8db) (BuildId: 7af4b8f1c9110ade)
#18 0x7f3999f2827c (/home/ttt/asan/libmojo_public_cpp_bindings.so+0x12827c) (BuildId: 7af4b8f1c9110ade)
#19 0x7f397db7b9e1 (/home/ttt/asan/libipc.so+0x17b9e1) (BuildId: 06b96c6bc00843bd)
#20 0x7f397db80c39 (/home/ttt/asan/libipc.so+0x180c39) (BuildId: 06b96c6bc00843bd)
#21 0x7f397db80938 (/home/ttt/asan/libipc.so+0x180938) (BuildId: 06b96c6bc00843bd)
#22 0x7f397db8059e (/home/ttt/asan/libipc.so+0x18059e) (BuildId: 06b96c6bc00843bd)
#23 0x7f397db803e8 (/home/ttt/asan/libipc.so+0x1803e8) (BuildId: 06b96c6bc00843bd)
#24 0x7f39a6206cc4 (/home/ttt/asan/libbase.so+0xa06cc4) (BuildId: 2ea62f5ae37135e0)
#25 0x7f39a6806560 (/home/ttt/asan/libbase.so+0x1006560) (BuildId: 2ea62f5ae37135e0)
#26 0x7f39a69405e5 (/home/ttt/asan/libbase.so+0x11405e5) (BuildId: 2ea62f5ae37135e0)
#27 0x7f39a693f06e (/home/ttt/asan/libbase.so+0x113f06e) (BuildId: 2ea62f5ae37135e0)
#28 0x7f39a693d274 (/home/ttt/asan/libbase.so+0x113d274) (BuildId: 2ea62f5ae37135e0)
#29 0x7f39a693f642 (/home/ttt/asan/libbase.so+0x113f642) (BuildId: 2ea62f5ae37135e0)
This is the same kind of list, but for the moment the memory was first handed out. AddressSanitizer remembers both events so it can show you the whole story: here is where the block was created, here is where it was released, and here is where it was wrongly used afterwards.
The summary line names the faulting library:
SUMMARY: AddressSanitizer: heap-use-after-free (/home/ttt/asan/libbase.so+0xba7ece) (BuildId: 2ea62f5ae37135e0)
This is the one-line verdict: the bug type and the exact place in libbase.so where the bad read happened.
The shadow memory dump confirms the region is marked as freed (fd) at the faulting address, with redzones (fa) around it:
Shadow bytes around the buggy address:
0x5130000f7400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x5130000f7480: 00 00 00 00 00 00 00 00 fa fa fa fa fa fa f7 fa
0x5130000f7500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x5130000f7580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x5130000f7600: 00 00 00 00 00 00 00 00 00 00 00 00 fa fa fa fa
=>0x5130000f7680: fa fa fa fa fa fa f7 fa[fd]fd fd fd fd fd fd fd
0x5130000f7700: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x5130000f7780: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x5130000f7800: fd fd fd fd fd fd fa fa fa fa fa fa fa fa f7 fa
0x5130000f7880: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x5130000f7900: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
Shadow memory is a clever trick. AddressSanitizer keeps a second, parallel map of memory where each byte records the state of eight real bytes. The legend below the dump explains the codes: 00 means addressable (fine to use), fa means a redzone (a guard area around a block, deliberately poisoned so that overruns are caught), and fd means a freed heap region. The arrow => points at the byte covering the faulting address, and it is fd, confirming the memory had been given back. The brackets mark the exact byte being read.
The report also includes the task trace attached to the ASan output:
Task trace:
#0 0x7f398b17b5c9 (/home/ttt/asan/libcontent.so+0x997b5c9) (BuildId: 9dcb118d5a6da423)
#1 0x7f399b9a4e30 (/home/ttt/asan/libmojo_public_system_cpp.so+0x92e30) (BuildId: b4bd78ec7327a291)
#2 0x7f398f953f38 (/home/ttt/asan/libcontent.so+0xe153f38) (BuildId: 9dcb118d5a6da423)
#3 0x7f399b9aa5eb (/home/ttt/asan/libmojo_public_system_cpp.so+0x985eb) (BuildId: b4bd78ec7327a291)
A task trace is a short record of the task (a unit of work) that was running when the crash happened. It shows the work passing through libcontent.so and the Mojo system library.
Root cause
The report itself does not analyse the code path; it provides the reproduction and the ASan evidence. What the evidence shows is that an object of 368 bytes is allocated on the main thread, later freed on the same thread through libcontent.so, and then read one byte at a time from offset zero while the accessibility platform layer is active. The read stack passes through libaccessibility_platform.so and into GLib's object system, which is consistent with the accessibility platform layer holding a reference to an object that the content layer has already released. In other words, the lifetime of the accessibility object is not correctly tied to the platform layer's use of it: the free happens first, and the platform layer dereferences the stale pointer afterwards. The exact ownership mistake is not described in the report.
A useful comparison: two people share a key to a storage locker. One of them clears out the locker and hands the key back to the building manager. The other still has a copy of the key and later opens the locker expecting their things to be there. Nothing stops them from opening it; the problem is that the contents are no longer what they expect. In software, the fix is to make sure nobody keeps using the key after the locker is cleared, or to make the locker refuse the old key.
The report does include the MiraclePtr status, which is relevant to why the crash was caught and how exploitable it is:
MiraclePtr Status: PROTECTED
This crash occurred while a raw_ptr<T> object containing a dangling pointer was being dereferenced.
MiraclePtr is expected to make this crash non-exploitable once fully enabled.
Refer to https://chromium.googlesource.com/chromium/src/+/main/base/memory/raw_ptr.md for details.
Line by line:
MiraclePtr Status: PROTECTEDsays a Chrome safety mechanism called MiraclePtr was in force for this access.This crash occurred while a raw_ptr<T> object containing a dangling pointer was being dereferenced.Araw_ptr<T>is a special kind of pointer in Chrome's code. A pointer is a reference to a place in memory; a dangling pointer is one whose target has been freed. The<T>is just a placeholder for the type of thing being pointed at.MiraclePtr is expected to make this crash non-exploitable once fully enabled.Non-exploitable means an attacker cannot turn the bug into something worse than a crash. Fully enabled means the protection is switched on everywhere.- The link points to Chrome's documentation for
raw_ptr.
So the dangling pointer was held in a raw_ptr<T>, and MiraclePtr was in a state where it protected the access. The report states that MiraclePtr is expected to make this crash non-exploitable once fully enabled.
Impact
The report does not describe an exploitation scenario. The observable effect is a crash of the browser process on the main thread, triggered by interacting with chrome://accessibility/. The observable effect is an AddressSanitizer abort on the main thread, triggered by interacting with chrome://accessibility/.
The severity assigned by the program is medium, with a bounty of 1,000 USD. Because the dangling pointer was held in a raw_ptr<T> and MiraclePtr was active for this access, the report notes that the crash is expected to be non-exploitable once MiraclePtr is fully enabled. Any impact beyond denial of service would depend on that protection being incomplete, which the report does not demonstrate.
Fix
What it does establish is the condition that must be addressed: the accessibility platform layer must not dereference an object after the content layer has freed it, so the object's lifetime needs to be extended for as long as the platform layer holds a reference, or the reference must be invalidated when the object is freed. The report also notes that fully enabling MiraclePtr is expected to make this crash non-exploitable, which is a mitigation rather than a fix for the lifetime bug itself. A mitigation reduces the harm; a fix removes the mistake.
Variants to test
These are follow-up experiments a tester could run to see whether the same mistake appears in other forms. Each one lists what a positive result would look like.
- Toggle accessibility modes in the opposite order on
chrome://accessibility/: enable Web Accessibility first, then start recording. A positive result is an ASan heap-use-after-free report with a similar read stack throughlibaccessibility_platform.so. - Start recording, enable Web Accessibility, then disable it again while recording continues. A positive result is a use-after-free on the same 368-byte object or on a related accessibility object.
- Repeat the start/stop recording cycle several times with Web Accessibility toggled in between. A positive result is a crash whose free stack still goes through
libcontent.soand whose read stack still enters the platform layer. - Run the same sequence with a page loaded that has a large accessibility tree, so that more accessibility objects are alive when the mode changes. A positive result is the same class of crash with a different allocation site.
- On other Chromium-based builds, check whether the same sequence produces a crash when MiraclePtr is disabled or not fully enabled. A positive result is a use-after-free that is not reported as
MiraclePtr Status: PROTECTED.
Glossary
- Accessibility: features that help people with disabilities use software, such as screen readers and keyboard navigation.
- Accessibility tree: Chrome's internal model of a page, organised as a tree of elements, used by assistive tools.
- AddressSanitizer (ASan): a debugging tool that watches memory accesses and reports illegal ones, such as use-after-free.
- Allocation: the act of reserving a block of memory for a program to use.
- API: an agreed way for one piece of software to ask another for something; a menu of allowed requests.
- Bounty: money paid for finding and reporting a security bug.
- Build: a compiled copy of a program.
- BuildId: a fingerprint identifying exactly which compiled version of a library was used.
- Call stack: the chain of function calls that led to the current point in a program.
- Checkbox: a small box in a user interface that you click to switch a setting on or off.
- Chrome VRP: Chrome Vulnerability Reward Program, Google's scheme for paying people who report Chrome bugs.
- CVE: Common Vulnerabilities and Exposures, a public label given to a specific security bug.
- Dangling pointer: a pointer whose target memory has already been freed.
- Debug build: a compiled copy of a program with extra checks and information, slower but better at catching mistakes.
- Denial of service: an attack or bug that stops a service from working, for example by crashing it.
- Dereference: to follow a pointer and use the thing it points at.
- Deterministic: producing the same result every time the same steps are followed.
- Exploitation: turning a bug into a practical attack, or in a report, the steps that trigger it.
- Flag: a tiny value, often just on or off, stored in a single byte.
- Frame: one entry in a call stack, representing one function call.
- Free: to give a block of memory back so the program can reuse it.
- GLib: a general-purpose library used by many Linux programs, including its object system.
- Heap: the area of memory a program uses for objects it creates while running.
- Heap-use-after-free: using memory from the heap after it has been freed.
- IPC: inter-process communication, the general idea of separate processes talking to each other.
- Library: a bundle of code with a specific job that a program can use.
- Main thread: the thread that runs a program's main work; labelled T0 in the log.
- Medium severity: a rating in the middle of a scale, indicating a bug that matters but is not the most serious.
- Memory address: a number identifying a location in memory, like a house number for a byte.
- MiraclePtr: a Chrome safety mechanism that makes certain dangling-pointer crashes non-exploitable.
- Mitigation: a change that reduces the harm of a bug without removing the underlying mistake.
- Mojo: Chrome's system for sending messages between its internal processes.
- Non-exploitable: cannot be turned into an attack worse than a crash.
- Offset: a distance from a starting point, used to say where inside a block or library something sits.
- Pointer: a reference to a place in memory.
- Process: a running program, with its own memory and an identifier number.
- Program counter (pc): a low-level value recording where in the code the program was executing.
- Raw_ptr: a special kind of pointer in Chrome's code that can be protected by MiraclePtr.
- Redzone: a guard area around a memory block, deliberately poisoned so that overruns are caught.
- Screen reader: software that reads a page aloud for someone who cannot see it.
- Shadow memory: a parallel map kept by AddressSanitizer recording the state of real memory.
- Stack: the area of memory used for short-lived function calls.
- Stack pointer (sp): a low-level value recording the current position of the stack.
- Task trace: a short record of the unit of work running when a crash happened.
- Thread: a stream of execution within a process; a program can have several running at once.
- UI: user interface, the buttons, checkboxes and menus a person clicks.
- Use-after-free: using memory after it has been freed.
- Web Accessibility: a mode in Chrome that controls which accessibility trees are maintained and how they are exposed to the platform layer.