linux/fs/ubifs
Eric Biggers af3cf928b9 ubifs: report correct st_size for encrypted symlinks
commit 064c734986011390b4d111f1a99372b7f26c3850 upstream.

The stat() family of syscalls report the wrong size for encrypted
symlinks, which has caused breakage in several userspace programs.

Fix this by calling fscrypt_symlink_getattr() after ubifs_getattr() for
encrypted symlinks.  This function computes the correct size by reading
and decrypting the symlink target (if it's not already cached).

For more details, see the commit which added fscrypt_symlink_getattr().

Fixes: ca7f85be8d ("ubifs: Add support for encrypted symlinks")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20210702065350.209646-5-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-12 08:56:39 +02:00
..
Kconfig
Makefile
auth.c ubifs: Fix memleak in ubifs_init_authentication 2021-03-04 10:26:25 +01:00
budget.c
commit.c
compress.c
crypto.c
debug.c
debug.h
dir.c ubifs: Set/Clear I_LINKABLE under i_lock for whiteout inode 2021-07-20 16:10:50 +02:00
file.c ubifs: report correct st_size for encrypted symlinks 2021-09-12 08:56:39 +02:00
find.c
gc.c
io.c
ioctl.c
journal.c
key.h
log.c
lprops.c
lpt.c
lpt_commit.c
master.c
misc.c
misc.h
orphan.c
recovery.c
replay.c ubifs: Only check replay with inode type to judge if inode linked 2021-05-11 14:04:14 +02:00
sb.c
scan.c
shrinker.c
super.c ubifs: Fix races between xattr_{set|get} and listxattr operations 2021-07-19 08:53:16 +02:00
tnc.c
tnc_commit.c
tnc_misc.c
ubifs-media.h
ubifs.h ubifs: Fix races between xattr_{set|get} and listxattr operations 2021-07-19 08:53:16 +02:00
xattr.c ubifs: Fix races between xattr_{set|get} and listxattr operations 2021-07-19 08:53:16 +02:00