summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorMatthias Goergens <matthias.goergens@gmail.com>2026-09-23 23:32:20 +0800
committerJan Kara <jack@suse.cz>2026-09-23 20:27:50 +0200
commit6e69419ca6a4bfc3f3445ab139fd07a0e9cf74be (patch)
tree293b211f34c0e9a34a29524b8ecbc858822eb4fe /tools/perf/scripts/python/bin
parenta4ed759939ed5b5b9803413111a54042f533f625 (diff)
downloadlinux-6e69419ca6a4bfc3f3445ab139fd07a0e9cf74be.tar.gz
linux-6e69419ca6a4bfc3f3445ab139fd07a0e9cf74be.zip
isofs: validate directory records in isofs_read_level3_size()
isofs_read_level3_size() walks the multi-extent directory records of a file and dereferences de->size and de->flags for each one without ever checking the record's length byte. A record with a short length placed near the end of a block makes those fixed-field reads run past the record, and for a record at the end of the last block of a page, past the buffer. readdir, lookup and the NFS get_parent path have validated every record with isofs_dir_record_valid() since commit e2ee4078ec58 ("isofs: validate directory records consistently"). Do the same here, after moving on to the next block when the previous record ended exactly at the end of the block or the rest of the block is zero padding, as commit 3c01d9263683 ("isofs: Fix handling of directories with tight blocks") does for the other two walkers. The check rejects a record that would run past its block, so the code that reassembled such a record from two blocks can no longer run. ECMA-119 does not allow directory records to straddle sector boundaries, which is what commit b2eb2e288604 ("isofs: Drop support of directory entries straddling blocks") relied on when it removed the same code from readdir and lookup. Remove it here too, along with its temporary record buffer. Found by fuzzing fs/isofs in a userspace harness with ASan (heap-buffer-overflow reads in de->flags). Signed-off-by: Matthias Goergens <matthias.goergens@gmail.com> Link: https://patch.msgid.link/20260923153220.777907-1-matthias.goergens@gmail.com Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions