summary refs log tree commit diff
path: root/samples/bpf
diff options
context:
space:
mode:
authorJingbo Xu <jefflexu@linux.alibaba.com>2023-04-14 14:18:10 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-05-11 23:03:07 +0900
commit0955b8eac33514112b9b5d260c50060befa29d20 (patch)
tree8a51f13832c5fc72c8e1dec001d5a317599ca74c /samples/bpf
parent50f1c1fba045d88b6eb24f3dc83eba538519f8a3 (diff)
downloadlinux-0955b8eac33514112b9b5d260c50060befa29d20.tar.gz
erofs: fix potential overflow calculating xattr_isize
[ Upstream commit 1b3567a1969b26f709d82a874498c0754ea841c3 ]

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: bfb8674dc044 ("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>
Diffstat (limited to 'samples/bpf')
0 files changed, 0 insertions, 0 deletions