Files
ppsspp/Core
Henrik Rydgård 6fb48fd45a Fix heap buffer overflow in CSO block device from crafted index table
A crafted .cso compressed ISO could trigger a heap buffer overflow on any
sector read, reachable via ordinary gameplay.

Two root causes:
1. Unvalidated frame index deltas. ReadBlock/ReadBlocks computed a
   compressed read range from two adjacent frame-index-table entries.
   With non-monotonic entries, compressedReadEnd - compressedReadPos
   underflows as u64, producing a huge read size that fileLoader->ReadAt()
   wrote into the fixed-size readBuffer.
2. hdr.align (indexShift, 0-255) used as '1 << indexShift' was undefined
   behavior at >= 32, and frameSize + (1 << indexShift) could wrap,
   undersizing the buffer while inflate() was configured with the full
   frameSize.

Fixes:
- Validate the index table is monotonically non-decreasing in the
  constructor.
- Reject files with indexShift > 20.
- Use unsigned shift for buffer size math and store readBufferSize.
- Clamp compressed read sizes to readBufferSize in both ReadBlock and
  ReadBlocks.
2026-07-31 20:35:12 +02:00
..
2026-07-30 18:44:44 +02:00
2026-06-02 11:15:08 +02:00
2026-07-30 10:03:15 +02:00
2026-07-27 23:41:13 +02:00
2026-07-29 16:27:33 +02:00
2026-06-12 17:28:52 +02:00
2025-05-31 18:25:55 +02:00
2025-03-27 14:26:48 +01:00
2026-07-29 16:27:33 +02:00
2026-07-29 16:27:33 +02:00
2025-08-31 13:37:43 +02:00
2026-07-27 18:37:28 +02:00
2026-05-19 13:59:04 +02:00
2026-07-29 16:27:33 +02:00
2026-07-23 15:04:04 -04:00
2025-10-27 12:20:24 +01:00