]> git.itanic.dy.fi Git - linux-stable/commit
ext4: add missing validation of fast-commit record lengths
authorEric Biggers <ebiggers@google.com>
Sun, 6 Nov 2022 22:48:38 +0000 (14:48 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 7 Jan 2023 10:16:03 +0000 (11:16 +0100)
commit54ae5493a41524623be60c13ba3f542fc1490985
treeab28f1d7325a7c307940d47a2f8ad297d2e996c1
parent206dd3acfb9bca54a25b228c7c7c2257eedde09b
ext4: add missing validation of fast-commit record lengths

commit 64b4a25c3de81a69724e888ec2db3533b43816e2 upstream.

Validate the inode and filename lengths in fast-commit journal records
so that a malicious fast-commit journal cannot cause a crash by having
invalid values for these.  Also validate EXT4_FC_TAG_DEL_RANGE.

Fixes: aa75f4d3daae ("ext4: main fast-commit commit path")
Cc: <stable@vger.kernel.org> # v5.10+
Signed-off-by: Eric Biggers <ebiggers@google.com>
Link: https://lore.kernel.org/r/20221106224841.279231-5-ebiggers@kernel.org
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/fast_commit.c
fs/ext4/fast_commit.h