Skip to content
Memory corruption Advisory Advanced CVE-2024-4559

Heap buffer overflow in WebAudio (CVE-2024-4559)

A use-after-poison (heap buffer overflow) in Chrome's WebAudio implementation could be triggered by a crafted web page, leading to a crash. The report demonstrates the crash with an AddressSanitizer error.

Cassidy Kim Follow

Originally disclosed on Chrome VRP

  • Fix shipped in 43 days

tested os:ubuntu 22.04 tested chrome version: Version 125.0.6368.2 (Developer Build) (64-bit)

Repro Steps: ./chrome --autoplay-policy=no-user-gesture-required --user-data-dir=/tmp/xx1 http://localhost:8880/crash.html

Bisect info: https://chromium-review.googlesource.com/c/chromium/src/+/5277872

==1==ERROR: AddressSanitizer: use-after-poison on address 0x7ef1002682a8 at pc 0x55baed287c91 bp 0x7ffe36961670 sp 0x7ffe36961668 READ of size 4 at 0x7ef1002682a8 thread T0 (chrome) #0 0x55baed287c90 in Load ./../../v8/include/cppgc/internal/member-storage.h:85:58 #1 0x55baed287c90 in GetRaw ./../../v8/include/cppgc/member.h:52:54 #2 0x55baed287c90 in Get ./../../v8/include/cppgc/member.h:270:52 #3 0x55baed287c90 in GetContextLifecycleNotifier ./../../third_party/blink/renderer/platform/context_lifecycle_observer.h:25:22 #4 0x55baed287c90 in blink::ExecutionContextLifecycleObserver::GetExecutionContext() const ./../../third_party/blink/renderer/core/execution_context/execution_context_lifecycle_observer.cc:40:41 #5 0x55baf2e2d639 in blink::AudioContext::OnRenderError() ./../../third_party/blink/renderer/modules/webaudio/audio_context.cc:1198:47 #6 0x55baf2f7ec3b in Invoke<void (blink::RealtimeAudioDestinationHandler::)(), const base::WeakPtrblink::RealtimeAudioDestinationHandler &> ./../../base/functional/bind_internal.h:738:12 #7 0x55baf2f7ec3b in MakeItSo<void (blink::RealtimeAudioDestinationHandler::)(), std::__Cr::tuple<base::WeakPtrblink::RealtimeAudioDestinationHandler > > ./../../base/functional/bind_internal.h:954:5 #8 0x55baf2f7ec3b in void base::internal::Invoker<base::internal::FunctorTraits<void (blink::RealtimeAudioDestinationHandler::&&)(), base::WeakPtrblink::RealtimeAudioDestinationHandler&&>, base::internal::BindState<true, true, false, void (blink::RealtimeAudioDestinationHandler::)(), base::WeakPtrblink::RealtimeAudioDestinationHandler>, void ()>::RunImpl<void (blink::RealtimeAudioDestinationHandler::)(), std::__Cr::tuple<base::WeakPtrblink::RealtimeAudioDestinationHandler>, 0ul>(void (blink::RealtimeAudioDestinationHandler::&&)(), std::__Cr::tuple<base::WeakPtrblink::RealtimeAudioDestinationHandler>&&, std::__Cr::integer_sequence<unsigned long, 0ul>) ./../../base/functional/bind_internal.h:1067:14 #9 0x55bae1a68bd6 in Run ./../../base/functional/callback.h:156:12 #10 0x55bae1a68bd6 in base::TaskAnnotator::RunTaskImpl(base::PendingTask&) ./../../base/task/common/task_annotator.cc:203:34 #11 0x55bae1ac5ed3 in RunTask<(lambda at ../../base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:475:11)> ./../../base/task/common/task_annotator.h:90:5 #12 0x55bae1ac5ed3 in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl(base::LazyNow*) ./../../base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:473:23 #13 0x55bae1ac4f64 in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork() ./../../base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:338:40 #14 0x55bae1ac6b5a in non-virtual thunk to base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork() ./../../base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:0:0 #15 0x55bae1977fa6 in base::MessagePumpDefault::Run(base::MessagePump::Delegate*) ./../../base/message_loop/message_pump_default.cc:40:55 #16 0x55bae1ac789b in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run(bool, base::TimeDelta) ./../../base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:641:12 #17 0x55bae1a05efe in base::RunLoop::Run(base::Location const&) ./../../base/run_loop.cc:134:14 #18 0x55baf735a188 in content::RendererMain(content::MainFunctionParams) ./../../content/renderer/renderer_main.cc:367:16 #19 0x55badf48ce5f in content::RunZygote(content::ContentMainDelegate*) ./../../content/app/content_main_runner_impl.cc:676:14 #20 0x55badf48e155 in content::RunOtherNamedProcessTypeMain(std::__Cr::basic_string<char, std::__Cr::char_traits<char>, std::__Cr::allocator<char>> const&, content::MainFunctionParams, content::ContentMainDelegate*) ./../../content/app/content_main_runner_impl.cc:780:12 #21 0x55badf490679 in content::ContentMainRunnerImpl::Run() ./../../content/app/content_main_runner_impl.cc:1146:10 #22 0x55badf48aef4 in content::RunContentProcess(content::ContentMainParams, content::ContentMainRunner*) ./../../content/app/content_main.cc:333:36 #23 0x55badf48ba11 in content::ContentMain(content::ContentMainParams) ./../../content/app/content_main.cc:346:10 #24 0x55bad0e11e08 in ChromeMain ./../../chrome/app/chrome_main.cc:192:12 #25 0x7b29af429d8f in __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16

Address 0x7ef1002682a8 is a wild pointer inside of access range of size 0x000000000004. SUMMARY: AddressSanitizer: use-after-poison (/home/pwn11/chromium/src/out/release/chrome+0x2aae2c90) (BuildId: 5de75dc9ffa5276f) Shadow bytes around the buggy address: 0x7ef100268000: f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 0x7ef100268080: 00 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 0x7ef100268100: f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 0x7ef100268180: f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 0x7ef100268200: f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 00 =>0x7ef100268280: f7 f7 f7 f7 f7[f7]f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 0x7ef100268300: f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 0x7ef100268380: f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 0x7ef100268400: f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 00 f7 0x7ef100268480: f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 0x7ef100268500: f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 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

==1==ADDITIONAL INFO

==1==Note: Please include this section with the ASan report. Task trace: #0 0x55baf2f7d1d0 in blink::RealtimeAudioDestinationHandler::OnRenderError() ./../../third_party/blink/renderer/modules/webaudio/realtime_audio_destination_handler.cc:263:24

==1==END OF ADDITIONAL INFO ==1==ABORTING

The original report as published on the Chromium issue tracker, by Cassidy Kim(@cassidy6564). Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Impact

The vulnerability could lead to a browser crash and potentially allow arbitrary code execution, though the report only demonstrates a crash.

What the attacker needed

Victim visits a malicious web page; Chrome with WebAudio enabled

The fix

The bug was fixed in a Chromium commit, as indicated by the bisect information.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

This report shows a memory safety bug in Chrome's audio processing code. When a web page uses certain audio features, the browser can access memory that has already been freed or poisoned, causing a crash. An attacker could use this to potentially execute code or at least crash the browser.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

More by Cassidy Kim

View all

29 more disclosed reports, best first.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.