ext4: fix leaking uninitialized memory in fast-commit journal
authorEric Biggers <ebiggers@google.com>
Sun, 6 Nov 2022 22:48:37 +0000 (14:48 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 7 Jan 2023 10:12:00 +0000 (11:12 +0100)
commit7c1fb65e8ce85c281d2cba9c236f9edbbc4eaca6
treefc6aec837901fd71e2fb0409f539998e481f6777
parent08d5c8445d15a4b0692dc23707550ad55ddf5ba3
ext4: fix leaking uninitialized memory in fast-commit journal

commit 594bc43b410316d70bb42aeff168837888d96810 upstream.

When space at the end of fast-commit journal blocks is unused, make sure
to zero it out so that uninitialized memory is not leaked to disk.

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-4-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