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>
Thu, 12 Jan 2023 10:59:01 +0000 (11:59 +0100)
commit871800770d7f2f952c7249ad52485c3564dab44e
tree2e5cbc87d132e70f2dc75ecf8d0107bcb4b3def2
parentd480a49c15c465cb9a16db1379f4996e9b5bb9cc
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