linux-stable/fs/erofs
Gao Xiang acc2f40b98 erofs: fix order >= MAX_ORDER warning due to crafted negative i_size
[ Upstream commit 1dd73601a1 ]

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: syzbot+f966c13b1b4fc0403b19@syzkaller.appspotmail.com
Fixes: 431339ba90 ("staging: erofs: add inode operations")
Reviewed-by: Yue Hu <huyue2@coolpad.com>
Link: https://lore.kernel.org/r/20220909023948.28925-1-hsiangkao@linux.alibaba.com
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-08 11:28:37 +01: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 pcluster use-after-free on UP platforms 2022-09-15 11:30:06 +02: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: clear compacted_2b if compacted_4b_initial > totalidx 2021-09-23 23:23:04 +08:00
zpvec.h erofs: fix unsafe pagevec reuse of hooked pclusters 2021-11-18 19:17:15 +01:00