Race condition in Compositing (CVE-2026-113078)
A time-of-check-to-time-of-use race condition exists in Chrome's GPU process where Slug::Deserialize parses text rendering data directly from renderer-controlled shared memory instead of copying it first. A compromised renderer could flip a length or offset field during parsing to cause a heap out-of-bounds read in the GPU process.
Originally disclosed on Chrome VRP
- Fix shipped in 7 months
VULNERABILITY DETAILS
TOCTOU race condition in GPU process: Slug::Deserialize() reads serialized text rendering data directly from renderer-controlled shared memory via an explicit const_cast that strips the volatile qualifier, while every other Skia deserializer in the same file copies to scratch space first.
In paint_op_reader.cc (cc/paint/paint_op_reader.cc), the PaintOpReader class holds memory_ as a const volatile uint8_t* pointer into renderer-controlled shared memory. At line 626:
*slug = sktext::gpu::Slug::Deserialize(
const_cast<const uint8_t*>(memory_), data_bytes,
options_.strike_client);
The const_cast<const uint8_t*>(memory_) explicitly strips the volatile qualifier from the shared memory pointer. Slug::Deserialize() then parses complex serialized text/glyph data directly from memory the renderer can modify concurrently.
CRITICAL INCONSISTENCY: Every other Skia complex-parser call in the same file copies to scratch space before parsing:
- SkPath (line 329): CopyScratchSpace(path_bytes) -> SkPath::ReadFromMemory(scratch, ...)
- SkColorSpace (line 577): CopyScratchSpace(size) -> SkColorSpace::Deserialize(scratch, ...)
- SkRegion (line 1758): HeapArray + ReadData() (memcpy) -> readFromMemory(data.data(), ...)
- HDRMetadata (line 969): CopyScratchSpace(size) -> Mojo deserialization
- SkString (line 1028): CopyScratchSpace(size) -> string construction
Slug::Deserialize is the ONLY Skia complex parser that does NOT copy first. The CopyScratchSpace() function exists and is designed for exactly this purpose but was not applied to the Slug path.
The transfer buffer uses base::UnsafeSharedMemoryRegion. The renderer retains full write access during GPU-side parsing. No synchronization exists.
Entry point: raster_decoder.cc DoRasterCHROMIUM (line 3026) calls PaintOp::Deserialize() which creates a PaintOpReader with memory_ pointing into the transfer buffer. When a DrawSlugOp is encountered, Read(sk_sp<Slug>*) at line 626 passes the shared memory directly to Slug::Deserialize(). This path is exercised by every web page that renders text.
VERSION Chrome Version: All versions with Slug text rendering support (current trunk and recent stable releases) Operating System: All platforms
REPRODUCTION CASE This vulnerability requires a compromised renderer process:
- Renderer sends RasterCHROMIUM command with paint ops containing DrawSlugOp
- The serialized slug data in the transfer buffer is initially valid
- A racing thread flips a length/offset field in the slug data
- GPU process deserializes via Slug::Deserialize() on the mutable memory
- TOCTOU: Skia validates small length, then reads large length -> heap OOB
Fix: Add CopyScratchSpace() before Slug::Deserialize(), matching the pattern used by all peer deserializers:
auto* scratch = CopyScratchSpace(data_bytes);
*slug = sktext::gpu::Slug::Deserialize(scratch, data_bytes,
options_.strike_client);
CREDIT INFORMATION Reporter credit: [Werner Kasselman]
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 the Slug deserialisation path passed the renderer-controlled shared memory pointer directly to the parser (stripping volatile with a const_cast) instead of copying it to scratch space first, unlike every peer deserialiser in the same file.
What the attacker needed
Compromised renderer process
The fix
The fix is to copy the slug data into scratch space with CopyScratchSpace() before calling Slug::Deserialize(), matching the pattern used by all peer deserialisers.
How it was found
- Renderer sends a RasterCHROMIUM command with paint ops containing a DrawSlugOp.
- The serialised slug data in the transfer buffer is initially valid.
- A racing thread flips a length or offset field in the slug data.
- The GPU process deserialises via Slug::Deserialize on the mutable memory.
- The parser validates a small length, then reads a large length, causing a heap out-of-bounds access.
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.
Shared memory is a region two processes can both read and write. Normally the GPU process copies data out of that shared region before trusting it, so the renderer cannot change it mid-parse. Here one parser skipped that copy, so a malicious renderer could change the data while it was being checked, tricking the GPU process into reading past the end of a buffer.
What is Race condition?
Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.