linux-stable/fs/erofs
Jingbo Xu f774a8451e 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-11 23:10:56 +09: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
compress.h erofs: introduce multi-reference pclusters (fully-referenced) 2022-07-22 21:44:27 +08:00
data.c erofs: use kmap_local_page() only for erofs_bread() 2022-12-07 10:56:31 +08:00
decompressor.c erofs: support interlaced uncompressed data for compressed files 2022-09-23 10:55:56 +08:00
decompressor_lzma.c erofs: fix wrong kunmap when using LZMA on HIGHMEM platforms 2023-03-17 08:57:45 +01:00
dir.c erofs: update ctx->pos for every emitted dirent 2022-07-31 22:26:29 +08:00
erofs_fs.h erofs: introduce partial-referenced pclusters 2022-09-26 23:55:43 +08:00
fscache.c erofs: relinquish volume with mutex held 2023-03-10 09:27:57 +01:00
inode.c Changes since the last update: 2022-12-12 20:14:04 -08:00
internal.h erofs: fix potential overflow calculating xattr_isize 2023-05-11 23:10:56 +09:00
namei.c fs: rename current get acl method 2022-10-20 10:13:27 +02:00
pcpubuf.c
super.c erofs: initialize packed inode after root inode is assigned 2023-05-11 23:10:56 +09:00
sysfs.c erofs: fix use-after-free of fsid and domain_id string 2022-11-10 09:53:20 +08:00
tagptr.h
utils.c mm: shrinkers: provide shrinkers with names 2022-07-03 18:08:40 -07:00
xattr.c erofs: use kmap_local_page() only for erofs_bread() 2022-12-07 10:56:31 +08:00
xattr.h erofs: clean up unnecessary code and comments 2022-09-27 17:27:25 +08:00
zdata.c erofs: Revert "erofs: fix kvcalloc() misuse with __GFP_NOFAIL" 2023-03-17 08:57:59 +01:00
zdata.h erofs: shouldn't churn the mapping page for duplicated copies 2022-10-17 06:55:49 +08:00
zmap.c erofs: stop parsing non-compact HEAD index if clusterofs is invalid 2023-05-11 23:10:56 +09:00