Gao Xiang c505feba4c erofs: validate the extent length for uncompressed pclusters
syzkaller reported a KASAN use-after-free:
https://syzkaller.appspot.com/bug?extid=2ae90e873e97f1faf6f2

The referenced fuzzed image actually has two issues:
 - m_pa == 0 as a non-inlined pcluster;
 - The logical length is longer than its physical length.

The first issue has already been addressed.  This patch addresses
the second issue by checking the extent length validity.

Reported-by: syzbot+2ae90e873e97f1faf6f2@syzkaller.appspotmail.com
Fixes: 02827e1796b3 ("staging: erofs: add erofs_map_blocks_iter")
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20221205150050.47784-2-hsiangkao@linux.alibaba.com
2022-12-07 10:56:31 +08:00
..
2022-07-02 18:52:21 +09:00
2022-10-06 17:13:18 -07:00
2022-10-04 13:38:03 -07:00
2022-10-10 20:13:22 -07:00
2022-05-09 16:21:45 -04:00
2022-08-03 10:35:43 -07:00
2022-10-07 08:19:26 -07:00
2022-09-24 07:00:00 +02:00
2022-11-15 16:56:07 +00:00
2022-11-17 09:04:50 -08:00
2022-10-10 19:45:17 -07:00
2022-10-10 19:45:17 -07:00
2022-05-09 16:21:46 -04:00
2022-09-11 20:26:07 -07:00
2022-10-06 17:36:48 -07:00
2022-09-24 07:00:00 +02:00
2022-08-20 11:34:33 -04:00
2022-10-10 19:45:17 -07:00
2022-10-29 17:49:33 -07:00
2022-06-29 13:07:16 +02:00
2022-10-06 16:49:00 -07:00
2022-04-01 19:35:56 -07:00
2022-10-10 14:21:11 -07:00
2022-08-03 10:35:43 -07:00
2022-10-10 19:45:17 -07:00
2022-10-06 17:13:18 -07:00
2022-06-28 13:58:05 -04:00
2022-05-22 21:03:01 +01:00