Skip to content

fix(raw): reject decompression-bomb / corrupt headers before unpack - #5312

Merged
lgritz merged 3 commits into
AcademySoftwareFoundation:mainfrom
lgritz:lg-rawbomb
Jul 24, 2026
Merged

fix(raw): reject decompression-bomb / corrupt headers before unpack#5312
lgritz merged 3 commits into
AcademySoftwareFoundation:mainfrom
lgritz:lg-rawbomb

Conversation

@lgritz

@lgritz lgritz commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

Add a pre-unpack guard that rejects when the declared raw data size dwarfs the actual file size by more than 10000x (real raw sensor data never compresses anywhere near that ratio), plus a check_open() call enforcing OIIO's standard global resolution/imagesize limits and LibRaw's own per-dimension and per-image channel caps, matching the pattern already used in other format readers.

Assisted-by: Claude Code / Claude Sonnet 5

Add a pre-unpack guard that rejects when the declared raw data size
dwarfs the actual file size by more than 10000x (real raw sensor data
never compresses anywhere near that ratio), plus a check_open() call
enforcing OIIO's standard global resolution/imagesize limits and
LibRaw's own per-dimension and per-image channel caps, matching the
pattern already used in other format readers.

Assisted-by: Claude Code / Claude Sonnet 5

Signed-off-by: Larry Gritz <lg@larrygritz.com>
Signed-off-by: Larry Gritz <lg@larrygritz.com>
Signed-off-by: Larry Gritz <lg@larrygritz.com>
@lgritz

lgritz commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator Author

Any objections?

@lgritz
lgritz merged commit b112832 into AcademySoftwareFoundation:main Jul 24, 2026
29 checks passed
@lgritz
lgritz deleted the lg-rawbomb branch July 24, 2026 01:09
lgritz added a commit to lgritz/OpenImageIO that referenced this pull request Jul 28, 2026
…cademySoftwareFoundation#5312)

Add a pre-unpack guard that rejects when the declared raw data size
dwarfs the actual file size by more than 10000x (real raw sensor data
never compresses anywhere near that ratio), plus a check_open() call
enforcing OIIO's standard global resolution/imagesize limits and
LibRaw's own per-dimension and per-image channel caps, matching the
pattern already used in other format readers.

Assisted-by: Claude Code / Claude Sonnet 5

---------

Signed-off-by: Larry Gritz <lg@larrygritz.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant