linux_dsm_epyc7002/fs/ext4
Eric Biggers f99cbf2880 ext4: report correct st_size for encrypted symlinks
commit 8c4bca10ceafc43b1ca0a9fab5fa27e13cbce99e 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 ext4_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: f348c25232 ("ext4 crypto: add symlink encryption")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20210702065350.209646-3-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-07-05 19:03:30 +02:00
..
acl.c
acl.h
balloc.c ext4: shrink race window in ext4_should_retry_alloc() 2021-04-07 15:00:03 +02:00
bitmap.c
block_validity.c
dir.c init: add dsm gpl source 2024-07-05 18:00:04 +02:00
ext4_extents.h
ext4_jbd2.c
ext4_jbd2.h init: add dsm gpl source 2024-07-05 18:00:04 +02:00
ext4.h init: add dsm gpl source 2024-07-05 18:00:04 +02:00
extents_status.c ext4: remove check for zero nr_to_scan in ext4_es_scan() 2021-07-14 16:55:41 +02:00
extents_status.h
extents.c init: add dsm gpl source 2024-07-05 18:00:04 +02:00
fast_commit.c ext4: fix fast commit alignment issues 2021-06-10 13:39:26 +02:00
fast_commit.h ext4: fix fast commit alignment issues 2021-06-10 13:39:26 +02:00
file.c init: add dsm gpl source 2024-07-05 18:00:04 +02:00
fsmap.c jbd2: rename j_maxlen to j_total_len and add jbd2_journal_max_txn_bufs 2020-11-06 23:01:02 -05:00
fsmap.h
fsync.c ext4: make s_mount_flags modifications atomic 2020-11-06 23:01:05 -05:00
hash.c init: add dsm gpl source 2024-07-05 18:00:04 +02:00
ialloc.c init: add dsm gpl source 2024-07-05 18:00:04 +02:00
indirect.c
inline.c init: add dsm gpl source 2024-07-05 18:00:04 +02:00
inode-test.c
inode.c init: add dsm gpl source 2024-07-05 18:00:04 +02:00
ioctl.c init: add dsm gpl source 2024-07-05 18:00:04 +02:00
Kconfig ext: EXT4_KUNIT_TESTS should depend on EXT4_FS instead of selecting it 2021-03-04 11:38:15 +01:00
Makefile init: add dsm gpl source 2024-07-05 18:00:04 +02:00
mballoc.c init: add dsm gpl source 2024-07-05 18:00:04 +02:00
mballoc.h
migrate.c
mmp.c ext4: fix memory leak in ext4_fill_super 2021-07-19 09:45:03 +02:00
move_extent.c
namei.c ext4: fix potential htree corruption when growing large_dir directories 2024-07-05 18:52:29 +02:00
page-io.c
readpage.c
resize.c init: add dsm gpl source 2024-07-05 18:00:04 +02:00
super.c init: add dsm gpl source 2024-07-05 18:00:04 +02:00
symlink.c ext4: report correct st_size for encrypted symlinks 2024-07-05 19:03:30 +02:00
syno_acl.c init: add dsm gpl source 2024-07-05 18:00:04 +02:00
syno_acl.h init: add dsm gpl source 2024-07-05 18:00:04 +02:00
sysfs.c init: add dsm gpl source 2024-07-05 18:00:04 +02:00
truncate.h
verity.c ext4: fix error handling in ext4_end_enable_verity() 2021-03-25 09:04:17 +01:00
xattr_hurd.c
xattr_security.c
xattr_trusted.c
xattr_user.c
xattr.c init: add dsm gpl source 2024-07-05 18:00:04 +02:00
xattr.h init: add dsm gpl source 2024-07-05 18:00:04 +02:00