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

Integer overflow in Skia (CVE-2024-9123)

An integer overflow in Skia's DrawAtlasOpImpl constructor leads to a null pointer offset and undefined behaviour when processing a crafted SKP file. An attacker could potentially cause a crash or out-of-bounds write by supplying a malicious SKP file.

raven Follow

Originally disclosed on Chrome VRP

  • Fix shipped in 21 days

Steps to reproduce the problem

  1. build skia skpbench
  2. out/asan/skpbench --src output.skp --config gl
  3. you will see
raven@192 ~/w/s/skia (main)> out/asan/skpbench --src output.skp --config gl
   accum    median       max       min   stddev  samples  sample_ms  clock  metric  config    bench
alloc_size------>>-2147483616
../../src/gpu/ganesh/ops/DrawAtlasOp.cpp:191:53: runtime error: applying non-zero offset 8 to null pointer
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../src/gpu/ganesh/ops/DrawAtlasOp.cpp:191:53 in 
fish: Job 1, 'out/asan/skpbench --src output.…' terminated by signal SIGABRT (Abort)
``

# Problem Description
above all

# Summary
out of bound write in skia  DrawAtlasOpImpl::DrawAtlasOpImpl

# Additional Data
Category: Security \
Chrome Channel: Not sure \
Regression: N/A

The original report as published on the Chromium issue tracker, by raven at KunLun lab. 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

Root cause

Likely an integer overflow in the DrawAtlasOpImpl constructor when calculating allocation size, leading to a null pointer offset and out-of-bounds write.

What the attacker needed

Crafted SKP file; victim opens the file

How it was found

  1. Build the skpbench tool from Skia.
  2. Run skpbench with the crafted SKP file and GL configuration.
  3. Observe the sanitizer error and crash.

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.

Skia is a graphics library used by Chrome and Android to draw things on screen. A specially crafted file can cause a number to overflow, making the program write data to the wrong place in memory, which can crash it or allow an attacker to run their own code.

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 raven

View all

15 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.