]> www.infradead.org Git - users/jedix/linux-maple.git/commit
udf: Avoid using corrupted block bitmap buffer
authorJan Kara <jack@suse.cz>
Mon, 17 Jun 2024 15:41:52 +0000 (17:41 +0200)
committerJan Kara <jack@suse.cz>
Wed, 26 Jun 2024 10:54:08 +0000 (12:54 +0200)
commita90d4471146de21745980cba51ce88e7926bcc4f
tree5fe90eebd8315ea4d2a7d6f13119a974edae0ba0
parent27ab33854873e6fb958cb074681a0107cc2ecc4c
udf: Avoid using corrupted block bitmap buffer

When the filesystem block bitmap is corrupted, we detect the corruption
while loading the bitmap and fail the allocation with error. However the
next allocation from the same bitmap will notice the bitmap buffer is
already loaded and tries to allocate from the bitmap with mixed results
(depending on the exact nature of the bitmap corruption). Fix the
problem by using BH_verified bit to indicate whether the bitmap is valid
or not.

Reported-by: syzbot+5f682cd029581f9edfd1@syzkaller.appspotmail.com
CC: stable@vger.kernel.org
Link: https://patch.msgid.link/20240617154201.29512-2-jack@suse.cz
Fixes: 1e0d4adf17e7 ("udf: Check consistency of Space Bitmap Descriptor")
Signed-off-by: Jan Kara <jack@suse.cz>
fs/udf/balloc.c
fs/udf/super.c