Skip to content
Commit 1dd73601 authored by Gao Xiang's avatar Gao Xiang
Browse files

erofs: fix order >= MAX_ORDER warning due to crafted negative i_size



As syzbot reported [1], the root cause is that i_size field is a
signed type, and negative i_size is also less than EROFS_BLKSIZ.
As a consequence, it's handled as fast symlink unexpectedly.

Let's fall back to the generic path to deal with such unusual i_size.

[1] https://lore.kernel.org/r/000000000000ac8efa05e7feaa1f@google.com

Reported-by: default avatar <syzbot+f966c13b1b4fc0403b19@syzkaller.appspotmail.com>
Fixes: 431339ba

 ("staging: erofs: add inode operations")
Reviewed-by: default avatarYue Hu <huyue2@coolpad.com>
Link: https://lore.kernel.org/r/20220909023948.28925-1-hsiangkao@linux.alibaba.com
Signed-off-by: default avatarGao Xiang <hsiangkao@linux.alibaba.com>
parent 80e78fcc
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment