Memory corruption in Codecs (CVE-2026-87444)
Several hand-written SIMD assembly routines in libyuv omit the non-volatile xmm6/ymm6 register from their clobber lists, so the compiler does not save and restore it. When JavaScript drives colour conversion through the WebCodecs VideoEncoder API, attacker-influenced pixel data can remain in that register and later be spilled onto the worker thread's stack, giving a restricted but controlled stack write.
Originally disclosed on Chrome VRP
- Fix shipped in 6 months
Report description
Systemic missing clobbers in libyuv inline assembly lead to non-volatile register poisoning with controled value and memory corruption
Bug location
Where do you want to report your vulnerability?
Chrome VRP – Report security issues affecting the Chrome browser. See program rules
Which URL (or repository) have you found the vulnerability in?
https://chromium.googlesource.com/libyuv/libyuv
The problem
Please describe the technical details of the vulnerability
Root Cause
The libyuv library (vendored at //third_party/libyuv/source/row_gcc.cc) contains manually written GCC inline assembly (asm volatile) for SIMD color conversions. Multiple functions fail to declare modified SIMD registers in their clobber lists.
Mechanism
In functions such as ARGBToUV444MatrixRow_AVX2 and MergeXR30Row_AVX2, the ymm6 register is actively used for intermediate mathematical operations (e.g., vpmaddubsw and vpcmpeqb). However, the clobber lists omit ymm6/xmm6, explicitly listing only xmm0 through xmm5 and xmm7.
Because the compiler is unaware that ymm6 is modified, it does not generate the necessary prologue and epilogue instructions to preserve the register's previous state.
ABI Violation and Memory Transition
Under the Windows x64 ABI, xmm6 through xmm15 are non-volatile (callee-saved). When JavaScript triggers these color conversions via the VideoEncoder API, the attacker's mathematically transformed pixel data is left resident in xmm6. During thread suspension or teardown (specifically in base::internal::WorkerThread::RunWorker), the thread's context is saved. The CPU executes movaps xmmword ptr [rsp+70h], xmm6, spilling the unmitigated, attacker-controlled pixel data directly into the active stack frame.
Systemic Issue and Exploitability Scope
An audit of row_gcc.cc reveals that missing clobbers are a systemic issue across the library, likely resulting from copy-pasting inline assembly macros without updating the clobber lists for newly added registers. However, while many functions omit clobbers, only the functions omitting non-volatile registers (xmm6) have been deemed exploitable for cross-boundary state poisoning. The omission of volatile registers (xmm0-xmm5) generally only results in localized, unexploitable intra-function compiler misoptimizations.
| Function | Omitted Clobber | Register Type (Win x64) | Exploitability |
|---|---|---|---|
ARGBToUV444MatrixRow_AVX2 |
ymm6 |
Non-Volatile | Exploitable (State Poisoning) |
MergeXR30Row_AVX2 |
ymm6 |
Non-Volatile | Unexploitable (State Poisoning, but haven't found an angle to get the function triggered through js) |
ARGBToAB64Row_AVX2 |
ymm3 |
Volatile | Unexploitable (Internal logic bug) |
InterpolateRow_AVX2 |
ymm3 |
Volatile | Unexploitable (Internal logic bug) |
ARGB4444ToARGBRow_SSE2 |
xmm5 |
Volatile | Unexploitable (Internal logic bug) |
SobelToPlaneRow_SSE2 |
xmm5 |
Volatile | Unexploitable (Internal logic bug) |
Impact analysis
Impact Assessment
Vulnerability Class: Memory Corruption (Restricted Stack Write) via State Poisoning.
Prerequisites: Execution of standard, unprivileged JavaScript using the WebCodecs VideoEncoder API and a 2D Canvas.
Exploitation Primitive
By supplying a precisely crafted, tiled image payload to the encoder, an attacker gains a deterministic, controlled 128-bit stack write. The hardware SIMD math (vpmaddubsw) dictates a direct relationship between the input RGB pixel values and the written bytes. Due to mathematical constraints in the pixel conversion, the payload is limited to approximately 3.6 million unique 32-bit values that repeat across the 64-bit boundary (e.g., 0xYYYYXXXXYYYYXXXX).
Security Consequence The attacker can surgically partition the 128-bit write:
- Lower 64-bits: Calculated to equal
0x0000000000000000to silently bypass intra-thread stability checks (there is a check that gets triggered in runworker when not having the lower bits set to 0). - Upper 64-bits: Calculated to represent a controlled, restricted 64-bit payload.
When subsequent functions on the WorkerThread reuse the poisoned stack memory ([rsp+70h]), the attacker's restricted payload is consumed as legitimate program state. While the constrained value prevents forging direct pointers to existing module bases, due to the wide codebase that can touch this poisoned state, the chances of further corruption or impact are deemed likely.
The cause
What version of Chrome have you found the security issue in?
[145.0.7632.119] + [stable]
Is the security issue related to a crash?
Yes, it is related to a crash.
Choose the type of vulnerability
Memory Corruption (in a sandboxed process)
How would you like to be publicly acknowledged for your report?
Casper Woudenberg
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 copy-pasted inline assembly macros whose clobber lists were never updated to include the non-volatile ymm6/xmm6 register, breaking the Windows x64 calling convention.
Impact
An attacker could achieve a deterministic, restricted 128-bit stack write with a controlled upper half, and the report judges further corruption or impact likely, though the constrained values prevent forging direct pointers to module bases.
What the attacker needed
Unprivileged JavaScript; WebCodecs VideoEncoder API; 2D Canvas; Windows x64 build of Chrome
How it was found
- Create a crafted, tiled image and feed it to the WebCodecs VideoEncoder API from unprivileged JavaScript.
- Trigger the AVX2 colour conversion routine that uses ymm6 without declaring it as clobbered.
- Cause the worker thread to suspend or tear down so its context is saved.
- The CPU spills the poisoned xmm6 value into the worker thread's stack frame.
- Later functions on the same thread reuse the poisoned stack memory as program state.
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.
A CPU register is a tiny, very fast storage slot inside the processor. Some registers are meant to be preserved across function calls, and the compiler relies on the assembly code to say which registers it changes so it can save them first. Here the assembly forgot to mention one such register, so leftover data from image processing could end up written onto the program's stack, which is where it keeps working data.
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.