Skip to content

fix(jxl): guard corrupt basic-info dimensions early#5305

Open
lgritz wants to merge 2 commits into
AcademySoftwareFoundation:mainfrom
lgritz:lg-jxldims
Open

fix(jxl): guard corrupt basic-info dimensions early#5305
lgritz wants to merge 2 commits into
AcademySoftwareFoundation:mainfrom
lgritz:lg-jxldims

Conversation

@lgritz

@lgritz lgritz commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Run check_open on JXL basic-info dimensions/channels before decode output allocation to prevent oversized allocation paths on malformed input.

Also update ref output for libjxl 0.12.0.

Assisted-by: GitHub Copilot / GPT-5.3-Codex

Run check_open on JXL basic-info dimensions/channels before decode
output allocation to prevent oversized allocation paths on malformed
input.

Also update ref output for libjxl 0.12.0.

Assisted-by: GitHub Copilot / GPT-5.3-Codex

Signed-off-by: Larry Gritz <lg@larrygritz.com>
if (!check_open(earlyspec, { 0, (1 << 30) - 1, 0, (1 << 30) - 1, 0,
1, 0, 4099 })) {
return false;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need the other check_open call below this still? It seems like every file is going to hit this JXL_DEC_BASIC_INFO conditional block and fill in the info struct.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quite right. I made an amendment.

missing basic info.

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.

2 participants