Skip to content

[stable-7.2] fix(thumbnails): bound declared image dimensions before decoding - #3489

Open
rhafer wants to merge 2 commits into
opencloud-eu:stable-7.2from
rhafer:backport/stable-7.2/pr-3457
Open

[stable-7.2] fix(thumbnails): bound declared image dimensions before decoding#3489
rhafer wants to merge 2 commits into
opencloud-eu:stable-7.2from
rhafer:backport/stable-7.2/pr-3457

Conversation

@rhafer

@rhafer rhafer commented Sep 8, 2026

Copy link
Copy Markdown
Member

backports #3457

The imaging build decodes the full pixel buffer from the header-declared
dimensions before the existing MaxInputWidth/MaxInputHeight guard runs, so a
tiny crafted file whose header declares huge dimensions forces a multi-GB
allocation and can OOM the worker. Read the header with DecodeConfig and reject
oversized sources before the decode allocates, in both the imaging and vips
builds, and thread the limit through the audio cover-art and geogebra decoders
that decode a second attacker-controlled image.

(cherry picked from commit 7f687ea)
@rhafer
rhafer requested review from micbar and v-scharf September 8, 2026 13:42
@codacy-production

codacy-production Bot commented Sep 8, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 12 complexity

Metric Results
Complexity 12

View in Codacy

🟢 Coverage 76.71% diff coverage · +0.06% coverage variation

Metric Results
Coverage variation +0.06% coverage variation (-1.00%)
Diff coverage 76.71% diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (1770793) Report Missing Report Missing Report Missing
Head commit (7984af1) 82083 (+63) 18962 (+64) 23.10% (+0.06%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#3489) 73 56 76.71%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

1 Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

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.

3 participants