ext4: verify dir block before splitting it
authorJan Kara <jack@suse.cz>
Wed, 18 May 2022 09:33:28 +0000 (11:33 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:21:23 +0000 (10:21 +0200)
commitda2f05919238c7bdc6e28c79539f55c8355408bb
treeac510ea8f5e7eade25b413495f036c1d0df5ec7f
parent4fd58b5cf118d2d9038a0b8c9cc0e43096297686
ext4: verify dir block before splitting it

commit 46c116b920ebec58031f0a78c5ea9599b0d2a371 upstream.

Before splitting a directory block verify its directory entries are sane
so that the splitting code does not access memory it should not.

Cc: stable@vger.kernel.org
Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20220518093332.13986-1-jack@suse.cz
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/namei.c