linux-stable/fs/erofs
Jingbo Xu 056a1217cf erofs: fix potential overflow calculating xattr_isize
[ Upstream commit 1b3567a196 ]

Given on-disk i_xattr_icount is 16 bits and xattr_isize is calculated
from i_xattr_icount multiplying 4, xattr_isize has a theoretical maximum
of 256K (64K * 4).

Thus declare xattr_isize as unsigned int to avoid the potential overflow.

Fixes: bfb8674dc0 ("staging: erofs: add erofs in-memory stuffs")
Signed-off-by: Jingbo Xu <jefflexu@linux.alibaba.com>
Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Link: https://lore.kernel.org/r/20230414061810.6479-1-jefflexu@linux.alibaba.com
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-17 11:47:38 +02:00
..
compress.h erofs: Replace HTTP links with HTTPS ones 2020-08-03 21:04:29 +08:00
data.c erofs: avoid using generic_block_bmap 2020-12-30 11:53:46 +01:00
decompressor.c erofs: avoid consecutive detection for Highmem memory 2022-08-21 15:15:35 +02:00
dir.c erofs: Replace HTTP links with HTTPS ones 2020-08-03 21:04:29 +08:00
erofs_fs.h erofs: add unsupported inode i_format check 2021-05-11 14:47:13 +02:00
inode.c erofs: add unsupported inode i_format check 2021-05-11 14:47:13 +02:00
internal.h erofs: fix potential overflow calculating xattr_isize 2023-05-17 11:47:38 +02:00
Kconfig
Makefile
namei.c erofs: Replace HTTP links with HTTPS ones 2020-08-03 21:04:29 +08:00
super.c erofs: fix error return code in erofs_read_superblock() 2021-07-14 16:56:53 +02:00
tagptr.h
utils.c erofs: fix deadlock when shrink erofs slab 2021-12-01 09:19:05 +01:00
xattr.c erofs: initialized fields can only be observed after bit is set 2021-03-04 11:38:28 +01:00
xattr.h erofs: Replace HTTP links with HTTPS ones 2020-08-03 21:04:29 +08:00
zdata.c erofs: fix unsafe pagevec reuse of hooked pclusters 2021-11-21 13:46:37 +01:00
zdata.h erofs: Replace HTTP links with HTTPS ones 2020-08-03 21:04:29 +08:00
zmap.c erofs: stop parsing non-compact HEAD index if clusterofs is invalid 2023-05-17 11:47:38 +02:00
zpvec.h erofs: fix unsafe pagevec reuse of hooked pclusters 2021-11-21 13:46:37 +01:00