]> www.infradead.org Git - users/jedix/linux-maple.git/commit
squashfs: squashfs_read_data need to check if the length is 0
authorLizhi Xu <lizhi.xu@windriver.com>
Thu, 16 Nov 2023 03:13:52 +0000 (11:13 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 20 Nov 2023 21:15:59 +0000 (13:15 -0800)
commitb2e4a8d1e4f0377b482ae39db788b575d200436b
tree03840371566787f3f00ead204fbdf3006d8f53e2
parentcf076d923ab0ced31ce1f11af64cf271a3523200
squashfs: squashfs_read_data need to check if the length is 0

When the length passed in is 0, the pagemap_scan_test_walk() caller should
bail.  This error causes at least a WARN_ON().

Link: https://lkml.kernel.org/r/20231116031352.40853-1-lizhi.xu@windriver.com
Reported-by: syzbot+32d3767580a1ea339a81@syzkaller.appspotmail.com
Closes: https://lkml.kernel.org/r/0000000000000526f2060a30a085@google.com
Signed-off-by: Lizhi Xu <lizhi.xu@windriver.com>
Reviewed-by: Phillip Lougher <phillip@squashfs.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/squashfs/block.c