Whamcloud - gitweb
libext2fs: add check for too-short directory blocks
authorTheodore Ts'o <tytso@mit.edu>
Mon, 6 Jun 2022 16:03:36 +0000 (12:03 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 6 Jun 2022 16:13:22 +0000 (12:13 -0400)
commitd497224dfbfdc1313136488cd7fb196885d40dfb
treef34cba5e73b568700d695df7d252822c22d1e891
parent1052048fb8f4ddcc0160eb670ef746ef7ee505a4
libext2fs: add check for too-short directory blocks

If there is an inline data directory which is smaller than 8 bytes
(which should never happen but for corrupted or fuzzed file systems),
ext2fs_process_dir_block() will now abort EXT2_ET_DIR_CORRUPTED to
avoid an out-of-bounds read.

Reported-by: Nils Bars <nils.bars@rub.de>
Reported-by: Moritz Schlögel <moritz.schloegel@rub.de>
Reported-by: Nico Schiller <nico.schiller@rub.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/dir_iterate.c