]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
ext4: check for out-of-order index extents in ext4_valid_extent_entries()
authorZhang Yi <yi.zhang@huawei.com>
Wed, 8 Sep 2021 12:08:48 +0000 (20:08 +0800)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 4 Jan 2022 08:49:41 +0000 (09:49 +0100)
commit6f727b2b324d3e711e12661ae365acf13d47c4ed
treee6052512353b47c9710dc3419796ab352d4d0fa3
parent720f9616ce420c93318a6e19928900cd6e156bea
ext4: check for out-of-order index extents in ext4_valid_extent_entries()

BugLink: https://bugs.launchpad.net/bugs/1956305
commit 8dd27fecede55e8a4e67eef2878040ecad0f0d33 upstream.

After commit 5946d089379a ("ext4: check for overlapping extents in
ext4_valid_extent_entries()"), we can check out the overlapping extent
entry in leaf extent blocks. But the out-of-order extent entry in index
extent blocks could also trigger bad things if the filesystem is
inconsistent. So this patch add a check to figure out the out-of-order
index extents and return error.

Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Reviewed-by: Theodore Ts'o <tytso@mit.edu>
Link: https://lore.kernel.org/r/20210908120850.4012324-2-yi.zhang@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
fs/ext4/extents.c