linux/fs/erofs
Gao Xiang ec134c1855 erofs: fix incorrect symlink detection in fast symlink
commit 9ed50b8231 upstream.

Fast symlink can be used if the on-disk symlink data is stored
in the same block as the on-disk inode, so we don’t need to trigger
another I/O for symlink data.  However, currently fs correction could be
reported _incorrectly_ if inode xattrs are too large.

In fact, these should be valid images although they cannot be handled as
fast symlinks.

Many thanks to Colin for reporting this!

Reported-by: Colin Walters <walters@verbum.org>
Reported-by: https://honggfuzz.dev/
Link: https://lore.kernel.org/r/bb2dd430-7de0-47da-ae5b-82ab2dd4d945@app.fastmail.com
Fixes: 431339ba90 ("staging: erofs: add inode operations")
[ Note that it's a runtime misbehavior instead of a security issue. ]
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20240909031911.1174718-1-hsiangkao@linux.alibaba.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2024-10-17 15:22:09 +02:00
..
compress.h erofs: simplify compression configuration parser 2024-03-01 13:26:38 +01:00
data.c erofs: avoid hardcoded blocksize for subpage block support 2024-10-17 15:22:08 +02:00
decompressor.c erofs: avoid hardcoded blocksize for subpage block support 2024-10-17 15:22:08 +02:00
decompressor_lzma.c erofs: avoid hardcoded blocksize for subpage block support 2024-10-17 15:22:08 +02:00
dir.c erofs: avoid hardcoded blocksize for subpage block support 2024-10-17 15:22:08 +02:00
erofs_fs.h erofs: set block size to the on-disk block size 2024-10-17 15:22:09 +02:00
fscache.c erofs: avoid hardcoded blocksize for subpage block support 2024-10-17 15:22:08 +02:00
inode.c erofs: fix incorrect symlink detection in fast symlink 2024-10-17 15:22:09 +02:00
internal.h erofs: set block size to the on-disk block size 2024-10-17 15:22:09 +02:00
Kconfig erofs: register fscache volume 2022-05-18 00:11:19 +08:00
Makefile erofs: register fscache volume 2022-05-18 00:11:19 +08:00
namei.c erofs: avoid hardcoded blocksize for subpage block support 2024-10-17 15:22:08 +02:00
pcpubuf.c erofs: get rid of ->lru usage 2021-10-25 08:22:59 +08:00
super.c erofs: set block size to the on-disk block size 2024-10-17 15:22:09 +02:00
sysfs.c erofs: fix use-after-free of fsid and domain_id string 2022-11-10 09:53:20 +08:00
utils.c mm: shrinkers: provide shrinkers with names 2022-07-03 18:08:40 -07:00
xattr.c erofs: avoid hardcoded blocksize for subpage block support 2024-10-17 15:22:08 +02:00
xattr.h erofs: avoid hardcoded blocksize for subpage block support 2024-10-17 15:22:08 +02:00
zdata.c erofs: avoid hardcoded blocksize for subpage block support 2024-10-17 15:22:08 +02:00
zmap.c erofs: avoid hardcoded blocksize for subpage block support 2024-10-17 15:22:08 +02:00