android_kernel_samsung_sm8650/fs/erofs
sunshijie 7521b904dc UPSTREAM: erofs: fix potential overflow calculating xattr_isize
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>
(cherry picked from commit 1b3567a1969b26f709d82a874498c0754ea841c3
    https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git dev)
Bug: 296824280

Change-Id: I43d88c7ebc3b320e226ab4d7bc6717432ef5ad82
Signed-off-by: sunshijie <sunshijie@xiaomi.corp-partner.google.com>
Signed-off-by: sunshijie <sunshijie@xiaomi.com>
2023-08-28 17:42:48 +00:00
..
compress.h erofs: introduce multi-reference pclusters (fully-referenced) 2022-07-22 21:44:27 +08:00
data.c UPSTREAM: mm: replace vma->vm_flags direct modifications with modifier calls 2023-06-07 14:24:57 +00:00
decompressor_lzma.c erofs: fix wrong kunmap when using LZMA on HIGHMEM platforms 2023-03-17 08:50:14 +01:00
decompressor.c erofs: support interlaced uncompressed data for compressed files 2022-09-23 10:55:56 +08: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:32:46 +01:00
inode.c erofs: clean up erofs_iget() 2022-09-27 17:27:45 +08:00
internal.h UPSTREAM: erofs: fix potential overflow calculating xattr_isize 2023-08-28 17:42:48 +00:00
Kconfig BACKPORT: erofs: add per-cpu threads for decompression as an option 2023-03-02 01:13:35 +00:00
Makefile erofs: register fscache volume 2022-05-18 00:11:19 +08:00
namei.c erofs: clean up erofs_iget() 2022-09-27 17:27:45 +08:00
pcpubuf.c erofs: get rid of ->lru usage 2021-10-25 08:22:59 +08:00
super.c UPSTREAM: erofs: initialize packed inode after root inode is assigned 2023-08-28 17:42:48 +00:00
sysfs.c erofs: fix use-after-free of fsid and domain_id string 2022-11-10 09:53:20 +08:00
tagptr.h erofs: clean up file headers & footers 2021-06-08 00:41:24 +08:00
utils.c mm: shrinkers: provide shrinkers with names 2022-07-03 18:08:40 -07:00
xattr.c erofs: use meta buffers for xattr operations 2022-01-04 23:47:08 +08:00
xattr.h erofs: clean up unnecessary code and comments 2022-09-27 17:27:25 +08:00
zdata.c FROMGIT: erofs: fix wrong primary bvec selection on deduplicated extents 2023-08-01 21:50:12 +00:00
zdata.h BACKPORT: erofs: add per-cpu threads for decompression as an option 2023-03-02 01:13:35 +00:00
zmap.c UPSTREAM: erofs: stop parsing non-compact HEAD index if clusterofs is invalid 2023-08-28 17:42:48 +00:00