]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
udf: Check LVID earlier
authorJan Kara <jack@suse.cz>
Mon, 3 May 2021 09:39:03 +0000 (11:39 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Sep 2021 08:00:28 +0000 (10:00 +0200)
commit0fbea32a0dc0f4b0a019fd991969cd43d0f29343
treee36b38e54e44de7bc8546700db8b028e0cb0e118
parent961159cd2b27806023304474de4994edd822bf61
udf: Check LVID earlier

[ Upstream commit 781d2a9a2fc7d0be53a072794dc03ef6de770f3d ]

We were checking validity of LVID entries only when getting
implementation use information from LVID in udf_sb_lvidiu(). However if
the LVID is suitably corrupted, it can cause problems also to code such
as udf_count_free() which doesn't use udf_sb_lvidiu(). So check validity
of LVID already when loading it from the disk and just disable LVID
altogether when it is not valid.

Reported-by: syzbot+7fbfe5fed73ebb675748@syzkaller.appspotmail.com
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/udf/super.c