Commit 55888db
Reject oversized exrmetrics vector allocations on ILP32 (#2539)
exrmetrics computed image buffer sizes as uint64_t but passed them to
std::vector::resize(size_type), which silently truncates on 32-bit
builds and left decode writing past undersized channel and sample-count
buffers.
Validate count and size to confirm the cast to size_t does not overflow.
Addresses https://github.com/AcademySoftwareFoundation/openexr/security/advisories/GHSA-r8mj-rhfc-38g4
Addresses https://github.com/AcademySoftwareFoundation/openexr/security/advisories/GHSA-pgc2-hppj-q623
Addresses https://github.com/AcademySoftwareFoundation/openexr/security/advisories/GHSA-g5m8-8w79-34q8
Addresses https://github.com/AcademySoftwareFoundation/openexr/security/advisories/GHSA-xc77-xm9h-qxm4
Signed-off-by: Cary Phillips <cary@ilm.com>
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent 04c52e7 commit 55888db
1 file changed
Lines changed: 26 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
49 | 69 | | |
50 | 70 | | |
51 | 71 | | |
| |||
92 | 112 | | |
93 | 113 | | |
94 | 114 | | |
95 | | - | |
| 115 | + | |
96 | 116 | | |
97 | 117 | | |
98 | 118 | | |
| |||
205 | 225 | | |
206 | 226 | | |
207 | 227 | | |
208 | | - | |
| 228 | + | |
209 | 229 | | |
210 | 230 | | |
211 | 231 | | |
| |||
324 | 344 | | |
325 | 345 | | |
326 | 346 | | |
327 | | - | |
| 347 | + | |
328 | 348 | | |
329 | 349 | | |
330 | 350 | | |
| |||
342 | 362 | | |
343 | 363 | | |
344 | 364 | | |
345 | | - | |
| 365 | + | |
346 | 366 | | |
347 | 367 | | |
348 | 368 | | |
| |||
492 | 512 | | |
493 | 513 | | |
494 | 514 | | |
495 | | - | |
| 515 | + | |
496 | 516 | | |
497 | 517 | | |
498 | 518 | | |
| |||
506 | 526 | | |
507 | 527 | | |
508 | 528 | | |
509 | | - | |
| 529 | + | |
510 | 530 | | |
511 | 531 | | |
512 | 532 | | |
| |||
0 commit comments