linux-stable/fs/erofs
Jingbo Xu 0834a2b554 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:00:20 +09:00
..
compress.h erofs: clean up file headers & footers 2021-06-08 00:41:24 +08:00
data.c iomap: Add done_before argument to iomap_dio_rw 2022-05-01 17:22:32 +02:00
decompressor.c erofs: avoid consecutive detection for Highmem memory 2022-08-17 14:23:12 +02:00
dir.c erofs: clean up file headers & footers 2021-06-08 00:41:24 +08:00
erofs_fs.h erofs: introduce chunk-based file on-disk format 2021-08-20 22:38:01 +08:00
inode.c erofs: fix order >= MAX_ORDER warning due to crafted negative i_size 2022-12-08 11:28:37 +01:00
internal.h erofs: fix potential overflow calculating xattr_isize 2023-05-11 23:00:20 +09:00
Kconfig erofs: iomap support for non-tailpacking DIO 2021-08-10 00:14:42 +08:00
Makefile erofs: introduce multipage per-CPU buffers 2021-04-10 03:19:59 +08:00
namei.c erofs: add fiemap support with iomap 2021-08-19 00:13:43 +08:00
pcpubuf.c erofs: introduce multipage per-CPU buffers 2021-04-10 03:19:59 +08:00
super.c libnvdimm for v5.15 2021-09-09 11:39:57 -07:00
tagptr.h erofs: clean up file headers & footers 2021-06-08 00:41:24 +08:00
utils.c erofs: fix deadlock when shrink erofs slab 2021-12-01 09:04:50 +01:00
xattr.c vfs: add rcu argument to ->get_acl() callback 2021-08-18 22:08:24 +02:00
xattr.h vfs: add rcu argument to ->get_acl() callback 2021-08-18 22:08:24 +02:00
zdata.c erofs: fix unsafe pagevec reuse of hooked pclusters 2021-11-18 19:17:15 +01:00
zdata.h erofs: clean up file headers & footers 2021-06-08 00:41:24 +08:00
zmap.c erofs: stop parsing non-compact HEAD index if clusterofs is invalid 2023-05-11 23:00:20 +09:00
zpvec.h erofs: fix unsafe pagevec reuse of hooked pclusters 2021-11-18 19:17:15 +01:00