Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

strukturag/libheif
master @ 8816c33
119
Fixes
0
CVEs
CRITICAL
Peak severity
25.0%
Coverage
Highlights
Denial of Service: 58 prior fixes. Scrutinize any change in this area.
libheif/box.cc: most-fixed (25 issues). Treat as high-risk during review.
62 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Integer Overflow: Multiple fixes address integer overflow in size/offset arithmetic that bypasses bounds checks, leading to OOB reads/writes or memory corruption. The uncompressed codec path is a recurring hotspot.
Denial of Service: Unbounded allocations and loops based on attacker-controlled counts (entries, references, samples, boxes) repeatedly caused memory exhaustion or CPU spikes. Fixes add security limits and centralize memory accounting.
Memory Corruption: Inconsistent plane sizes, duplicate/mismatched alpha planes, and integer overflow in stride/dimension calculations repeatedly caused OOB reads/writes during scaling, cropping, and overlay operations.