[PATCH] erofs: reject inodes with negative i_size
Chao Yu
chao at kernel.org
Thu Sep 12 19:08:54 AEST 2024
On 2024/9/12 16:35, Gao Xiang wrote:
> Negative i_size is never supported, although crafted images with inodes
> having negative i_size will not lead to security issues in our current
> codebase:
>
> The following image can verify this (gzip+base64 encoded):
>
> H4sICCmk4mYAA3Rlc3QuaW1nAGNgGAWjYBSMVPDo4dcH3jP2aTED2TwMKgxMUHHNJY/SQDQX
> LxcDIw3tZwXit44MDNpQ/n8gQJZ/vxjijosPuSyZ0DUDgQqcZoKzVYFsDShbHeh6PT29ktTi
> Eqz2g/y2pBFiLxDMh4lhs5+W4TAKRsEoGAWjYBSMglEwCkYBPQAAS2DbowAQAAA=
>
> Mark as bad inodes for such corrupted inodes explicitly.
>
> Signed-off-by: Gao Xiang <hsiangkao at linux.alibaba.com>
Reviewed-by: Chao Yu <chao at kernel.org>
Thanks,
More information about the Linux-erofs
mailing list