ladybird/Tests/LibGfx
sideshowbarker 602e7fe2bd LibGfx: Reject a BMP V5 ICC profile offset that points out of bounds
Problem: A BMP V5 image whose embedded ICC profile offset points past
the end of the file triggers an OOB read.

Cause: The bounds check summed the profile offset, the file-header size,
and the profile size in 32-bit arithmetic. So, a large offset (e.g.
0xfffffff0) wraps the sum back into range and passes the check. The
decoder then returns a span pointing far past the end of the file.

Fix: Compute the sum in 64 bits — so an out-of-bounds offset can no
longer wrap, and the profile’s rejected.

Fixes: https://github.com/LadybirdBrowser/ladybird/issues/9967
2026-06-15 20:19:33 +09:00
..
test-inputs LibGfx: Reject a BMP V5 ICC profile offset that points out of bounds 2026-06-15 20:19:33 +09:00
BenchmarkJPEGLoader.cpp Everywhere: Remove Serenity specific code from tests 2024-07-05 07:29:51 +02:00
CMakeLists.txt LibGfx: Split image decoders into a separate library 2026-06-10 11:55:48 +02:00
TestBitmapExport.cpp LibGfx: Move bitmap export out of ImmutableBitmap 2026-05-05 14:39:17 -05:00
TestColor.cpp LibGfx: Implement WCAG's contrast ratio in Color 2026-06-09 17:23:26 +02:00
TestImageDecoder.cpp LibGfx: Reject a BMP V5 ICC profile offset that points out of bounds 2026-06-15 20:19:33 +09:00
TestImageWriter.cpp LibGfx: Remove WebP animation writer and utility 2025-08-05 11:30:20 +02:00
TestQuad.cpp LibGfx: Verify Rect and Quad are consistent in boundary point inclusions 2024-12-15 23:27:42 +01:00
TestRect.cpp LibGfx+LibWeb: Delete unused Line class and Rect methods 2025-11-04 23:16:02 +01:00
TestWOFF.cpp LibGfx: Rename WOFF[2]::try_load_from_externally_owned_memory() 2025-05-03 12:01:43 +01:00
TestWOFF2.cpp Meta: Enforce newlines around namespaces 2025-05-14 02:01:59 -06:00
TestYUVData.cpp LibGfx: Preserve native YUV samples for CPU conversion 2026-05-05 14:39:17 -05:00