Skip to content

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

Merged
lgritz merged 2 commits into
AcademySoftwareFoundation:mainfrom
lgritz:lg-jxldims
Jul 8, 2026
Merged

fix(jxl): guard corrupt basic-info dimensions early#5305
lgritz merged 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>

@jessey-git jessey-git left a comment

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.

Looks good to me.

@lgritz lgritz merged commit fed212a into AcademySoftwareFoundation:main Jul 8, 2026
30 checks passed
@lgritz lgritz deleted the lg-jxldims branch July 9, 2026 04:27
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