Out of bounds write in V8 (CVE-2024-7970)
An out-of-bounds write occurs in V8's garbage collector when handling external pointers during heap scavenging, causing a segmentation fault or assertion failure. An attacker could potentially trigger this crash, but the report does not demonstrate code execution or other impact.
Originally disclosed on Chrome VRP
- Fix shipped in 25 days
tested os:ubuntu 22.04 and MacOS tested chromimum version: Chromium 129.0.6647.0(gs://chromium-browser-asan/linux-release/asan-linux-release-1339466.zip) Chromium 128.0.6601.2
The issue occurs during garbage collection within the V8 engine, specifically within the v8::internal::Scavenger::Process function. The SEGV is caused by an invalid memory write operation. The problem appears to be related to the handling of external pointers during heap scavenging.
repro steps: ./chrome --incognito --user-data-dir=/tmp/xx2 http://localhost:8880/crash.html --headless --disable-gpu --disable-in-process-stack-traces
Note: The issue is intermittently reproducible, with a 50% chance of triggering a segmentation fault (SEGV) or encountering a failed assertion (Check failed: IsValidHandle(old_handle).).
==1==ERROR: AddressSanitizer: SEGV on unknown address 0x79bcb5ec0000 (pc 0x579608a9b3dd bp 0x7ffcf0153a80 sp 0x7ffcf0153a50 T0) ==1==The signal is caused by a WRITE memory access. #0 0x579608a9b3dd in __cxx_atomic_store<v8::internal::TaggedPayloadv8::internal::ExternalPointerTableEntry::ExternalPointerTaggingScheme > ../../third_party/libc++/src/include/__atomic/cxx_atomic_impl.h:304:3 ,,, #2 0x579608a9b3dd in Evacuate ../../v8/src/sandbox/external-pointer-table-inl.h:144:17 ,,, #4 0x579608a9b3dd in VisitExternalPointer ../../v8/src/heap/scavenger.cc:106:11 ,,, #9 0x579608a754e0 in v8::internal::Scavenger::IterateAndScavengePromotedObject ../../v8/src/heap/scavenger.cc:728:11 #10 0x579608a634d2 in v8::internal::Scavenger::Process ../../v8/src/heap/scavenger.cc:847:7 ,,, #22 0x5796088dab40 in v8::internal::Heap::Scavenge ../../v8/src/heap/heap.cc:2804:25 ,,, #29 0x5796088ac92e in v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath ../../v8/src/heap/heap-allocator.cc:120:5 ,,, #50 0x57960875c1f9 in v8::internal::MicrotaskQueue::PerformCheckpointInternal ../../v8/src/execution/microtask-queue.cc:129:3 SUMMARY: AddressSanitizer: SEGV (BuildId: b8ec94666b85371f)
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
Root cause
Likely an incorrect handling of external pointers during scavenging leads to an out-of-bounds write in the external pointer table.
Impact
The vulnerability could cause a denial of service (browser crash) but the report does not demonstrate remote code execution or other impact.
What the attacker needed
Victim visits a malicious web page; Chromium version 128 or 129
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 is a crash in the JavaScript engine (V8) that happens during memory cleanup (garbage collection). A specially crafted web page can cause the engine to write to the wrong memory location, which crashes the browser. The report does not show that an attacker can do more than 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.