kernel_samsung_a53x/fs/erofs
Gao Xiang 08a4c231f1 erofs: fix incorrect symlink detection in fast symlink
commit 9ed50b8231e37b1ae863f5dec8153b98d9f389b4 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: 431339ba9042 ("staging: erofs: add inode operations")
[ Note that it's a runtime misbehavior instead of a security issue. ]
Link: https://lore.kernel.org/r/20240909031911.1174718-1-hsiangkao@linux.alibaba.com
[ Gao Xiang: fix 5.10.y build warning due to `check_add_overflow`. ]
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-01-15 16:29:40 +01:00
..
compress.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
data.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
decompressor.c BACKPORT: erofs: fix lz4 inplace decompression 2024-11-17 17:41:30 +01:00
dir.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
erofs_fs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
inode.c erofs: fix incorrect symlink detection in fast symlink 2025-01-15 16:29:40 +01:00
internal.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
namei.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcpubuf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
super.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sysfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tagptr.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
utils.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xattr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xattr.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
zdata.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
zdata.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
zmap.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
zpvec.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00