Files
ppsspp/Core
Henrik Rydgård e94463b4b6 NPDRMDemoBlockDevice: validate untrusted PBP header/table fields
The block table read from an NPDRM PBP's PSAR blob is only reversibly
XOR-scrambled, not otherwise validated, so a crafted file fully
controls table_[block].size/offset and the header's LBA/block-size
fields. Several of these were used without checks:

- table_[block].size could exceed blockSize_, causing ReadAt and the
  KIRK cipher update to write past the end of blockBuf_/tempBuf_ (both
  allocated as exactly blockSize_ bytes) - a heap buffer overflow.
- The block index derived from blockNumber (which can come from an
  attacker-influenced /sce_lbn.../_size... raw sector open) was never
  bounds-checked against numBlocks_ before indexing table_[].
- blockLBAs_ could be 0, dividing by zero both when computing
  numBlocks_ and when computing the block index in ReadBlock.
- lbaSize_ could underflow if lbaEnd < lbaStart, and tableSize_
  (numBlocks_ * sizeof(table_info)) was computed in 32-bit, so a large
  numBlocks_ could wrap it to a small value - passing the "did we read
  the whole table" check while only actually reading (and
  descrambling) a small prefix, leaving the rest of the table_ array
  as untouched, uninitialized heap memory that ReadBlock() would later
  trust.

Reject all of these instead.
2026-08-11 08:57:15 +02:00
..
2026-08-10 10:11:24 +02:00
2026-08-10 10:11:24 +02:00
2026-08-09 22:10:54 +02:00
2026-08-09 22:10:54 +02:00
2026-06-02 11:15:08 +02:00
2026-08-09 22:10:54 +02:00
2026-08-10 11:02:25 +02:00
2026-07-29 16:27:33 +02:00
2026-08-03 19:11:07 +02:00
2026-08-10 10:11:24 +02:00
2026-08-05 09:48:51 +02:00
2026-08-05 00:15:56 +02:00
2025-05-31 18:25:55 +02:00
2025-03-27 14:26:48 +01:00
2026-08-10 10:11:24 +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-07-29 16:27:33 +02:00