]> git.itanic.dy.fi Git - linux-stable/commit
ext4: disable fast-commit of encrypted dir operations
authorEric Biggers <ebiggers@google.com>
Sun, 6 Nov 2022 22:48:35 +0000 (14:48 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 7 Jan 2023 10:16:02 +0000 (11:16 +0100)
commit0bdcac7469aa6f47eb19e1a9ba8fde822a96fd37
tree409b6949aceb53b05f1249072a1b165b814fc44c
parent1f7a6626f611aa06d7907aa45b484708dd5ac8bc
ext4: disable fast-commit of encrypted dir operations

commit 0fbcb5251fc81b58969b272c4fb7374a7b922e3e upstream.

fast-commit of create, link, and unlink operations in encrypted
directories is completely broken because the unencrypted filenames are
being written to the fast-commit journal instead of the encrypted
filenames.  These operations can't be replayed, as encryption keys
aren't present at journal replay time.  It is also an information leak.

Until if/when we can get this working properly, make encrypted directory
operations ineligible for fast-commit.

Note that fast-commit operations on encrypted regular files continue to
be allowed, as they seem to work.

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-2-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
include/trace/events/ext4.h