Skip to content

Commit e6e053b

Browse files
authored
Merge branch 'main' into release-cherry-changes
2 parents 4394541 + ec93548 commit e6e053b

21 files changed

Lines changed: 486 additions & 145 deletions

.github/workflows/ci_freebsd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
runs-on: ubuntu-latest
3737
steps:
3838
- name: Build and test on FreeBSD
39-
uses: vmactions/freebsd-vm@4807432c7cab1c3f97688665332c0b932062d31f # v1
39+
uses: vmactions/freebsd-vm@7ca82f79fe3078fecded6d3a2bff094995447bbd # v1
4040
with:
4141
release: '15.0'
4242
envs: GITHUB_REPOSITORY GITHUB_REF GITHUB_SHA

.github/workflows/ci_steps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ jobs:
159159

160160
- name: Install MSYS2 ${{ inputs.msystem }}
161161
if: inputs.msystem != ''
162-
uses: msys2/setup-msys2@4f806de0a5a7294ffabaff804b38a9b435a73bda # v2.30.0
162+
uses: msys2/setup-msys2@cafece8e6baf9247cf9b1bf95097b0b983cc558d # v2.31.0
163163
with:
164164
msystem: ${{ inputs.msystem }}
165165
update: true

.github/workflows/codeql.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
# cary: Pin the version to the SHA for 2.18.0, since there appears to
6969
# be a problem with 2.18.1 leading to a "No space left on
7070
# device" failure
71-
uses: github/codeql-action/init@b1bff81932f5cdfc8695c7752dcee935dcd061c8 # v4.33.0
71+
uses: github/codeql-action/init@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1
7272
with:
7373
# cary: the "linked" setting is necessary to force the run to pick up
7474
# the version specified in the action.
@@ -99,6 +99,6 @@ jobs:
9999
100100
- name: Perform CodeQL Analysis
101101
# Pin the version to the SHA for 2.18.0
102-
uses: github/codeql-action/analyze@b1bff81932f5cdfc8695c7752dcee935dcd061c8 # v4.33.0
102+
uses: github/codeql-action/analyze@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1
103103
with:
104104
category: "/language:${{matrix.language}}"

.github/workflows/release-notice.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
slack_bot_token: ${{ secrets.SLACK_BOT_TOKEN }}
2626
slack_channel: "#release-announcements"
2727
project_logo: "https://artwork.aswf.io/projects/openexr/icon/color/openexr-icon-color.png"
28-
uses: jmertic/slack-release-notifier@35fad060af5559c24decdec0f701e6ba93566704 # main
28+
uses: jmertic/slack-release-notifier@32206e01ee0b0f66865d2be13bb3c62e474b5ce0 # main
2929

3030
- name: 'Notify Slack #openexr'
3131
id: slack2
@@ -34,5 +34,5 @@ jobs:
3434
slack_bot_token: ${{ secrets.SLACK_BOT_TOKEN }}
3535
slack_channel: "#openexr"
3636
project_logo: "https://artwork.aswf.io/projects/openexr/icon/color/openexr-icon-color.png"
37-
uses: jmertic/slack-release-notifier@35fad060af5559c24decdec0f701e6ba93566704 # main
37+
uses: jmertic/slack-release-notifier@32206e01ee0b0f66865d2be13bb3c62e474b5ce0 # main
3838

.github/workflows/release-sign.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
run: git archive --format=tar.gz -o ${OPENEXR_TARBALL} --prefix ${OPENEXR_PREFIX} ${TAG}
5454

5555
- name: Sign archive with Sigstore
56-
uses: sigstore/gh-action-sigstore-python@a5caf349bc536fbef3668a10ed7f5cd309a4b53d # v3.2.0
56+
uses: sigstore/gh-action-sigstore-python@04cffa1d795717b140764e8b640de88853c92acc # v3.3.0
5757
with:
5858
inputs: ${{ env.OPENEXR_TARBALL }}
5959
upload-signing-artifacts: false

.github/workflows/scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,6 @@ jobs:
5454

5555
# Upload the results to GitHub's code scanning dashboard.
5656
- name: "Upload to code-scanning"
57-
uses: github/codeql-action/upload-sarif@b1bff81932f5cdfc8695c7752dcee935dcd061c8 # v4.33.0
57+
uses: github/codeql-action/upload-sarif@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1
5858
with:
5959
sarif_file: results.sarif

CHANGES.md

Lines changed: 163 additions & 75 deletions
Large diffs are not rendered by default.

SECURITY.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,32 @@ library. Malformed images could caused issues such as heap buffer
163163
overflows, out-of-memory faults, or segmentation faults that could be
164164
exploitable as denial-of-service attacks.
165165

166+
### Image Size Limits and Out-of-Memory Failures
167+
168+
The OpenEXR file format places no fixed limit on image size, except
169+
that image width and height are represented by signed 32-bit integers
170+
and therefore technically limited to a maximum of 2,147,483,647.
171+
172+
Memory allocation failures caused by large image dimensions declared
173+
in file headers are not considered security vulnerabilities when the
174+
allocation size is proportional to the declared image dimensions. EXR
175+
files can legitimately describe very large images, and the memory
176+
required to decode them is inherently proportional to their pixel
177+
count. Exhausting available memory on a given machine is a system
178+
resource constraint, not a library defect — the same file that
179+
triggers an out-of-memory error on one machine may load successfully
180+
on another with more memory.
181+
182+
The OpenEXR library provides
183+
`Imf::Header::setMaxImageSize(int maxWidth,int maxHeight)` and
184+
`Imf::Header:"setMaxTileSize(int maxWidth,int maxHeight)` (and
185+
`exr_set_default_maximum_image_size()` and
186+
`exr_set_default_maximum_tile_size()` in OpenEXRCore) to allow
187+
applications to reject files with dimensions exceeding a configurable
188+
limit before any large allocation occurs. Applications processing
189+
untrusted EXR files should set these limits to values appropriate for
190+
their deployment environment.
191+
166192
### Hardening
167193

168194
#### Testing

src/lib/OpenEXRCore/compression.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,11 @@ exr_uncompress_buffer (
201201
}
202202
else if (res == LIBDEFLATE_SHORT_OUTPUT)
203203
{
204-
/* TODO: is this an error? */
204+
/* Decompression succeeded; *actual_out is the byte count. This is
205+
* not an error when out_bytes_avail exceeds the true uncompressed
206+
* size (e.g. PXR24/ZIP use padded scratch buffers). Callers that
207+
* need an exact payload size must compare *actual_out (see e.g.
208+
* undo_pxr24_impl). */
205209
return EXR_ERR_SUCCESS;
206210
}
207211
return EXR_ERR_CORRUPT_CHUNK;

src/lib/OpenEXRCore/internal_dwa_decoder.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ LossyDctDecoder_execute (
328328
rowBlock[0] = (uint16_t*) simd_align_pointer (rowBlockHandle);
329329

330330
for (int comp = 1; comp < numComp; ++comp)
331-
rowBlock[comp] = rowBlock[comp - 1] + numBlocksX * 64;
331+
rowBlock[comp] = rowBlock[comp - 1] + (size_t) numBlocksX * 64;
332332

333333
//
334334
// Pack DC components together by common plane, so we can get
@@ -338,7 +338,7 @@ LossyDctDecoder_execute (
338338

339339
currDcComp[0] = (uint16_t*) d->_packedDc;
340340
for (int comp = 1; comp < numComp; ++comp)
341-
currDcComp[comp] = currDcComp[comp - 1] + numBlocksX * numBlocksY;
341+
currDcComp[comp] = currDcComp[comp - 1] + (size_t) numBlocksX * numBlocksY;
342342

343343
for (int blocky = 0; blocky < numBlocksY; ++blocky)
344344
{

0 commit comments

Comments
 (0)