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:30:43 +0000 (10:30 +0200)
commit298659c0e7074f774a794fc293df4014617b87be
treef7699d6de66c3b9c20be90f158e31d459ee8beda
parentea6ea18b3ab0c0d7fefffb3c4d27df758b1c790a
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