[syzbot] divide error in squashfs_readpage

10 views
Skip to first unread message

syzbot

unread,
May 3, 2021, 1:20:21 PMMay 3
to linux-...@vger.kernel.org, phi...@squashfs.org.uk, syzkall...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: d2b6f8a1 Merge tag 'xfs-5.13-merge-3' of git://git.kernel...
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1336f3f5d00000
kernel config: https://syzkaller.appspot.com/x/.config?x=65c207250bba4efe
dashboard link: https://syzkaller.appspot.com/bug?extid=e8f781243ce16ac2f962
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=17c7221ed00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13bc5cc3d00000

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+e8f781...@syzkaller.appspotmail.com

loop0: detected capacity change from 0 to 8
divide error: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 8394 Comm: syz-executor613 Not tainted 5.12.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:fill_meta_index fs/squashfs/file.c:243 [inline]
RIP: 0010:read_blocklist fs/squashfs/file.c:332 [inline]
RIP: 0010:squashfs_readpage+0xa0d/0x2210 fs/squashfs/file.c:469
Code: 3c 24 31 d2 48 63 8c 24 b4 00 00 00 49 8b 47 c8 48 89 cf 48 c1 e1 0b c1 e7 0b 89 7c 24 4c 31 ff 48 89 44 24 60 48 63 44 24 70 <48> f7 f1 49 89 c6 89 c6 48 89 44 24 58 89 44 24 1c 89 44 24 48 e8
RSP: 0018:ffffc9000188f3e8 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000099 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff8221fc4d RDI: 0000000000000000
RBP: 000000000000000c R08: ffffffffffffffff R09: 000000000000000c
R10: ffffffff8221fc3e R11: 000000000000003f R12: 00000000000000de
R13: ffff888033290088 R14: 0000000000000000 R15: ffff888033290038
FS: 00000000024ae300(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fffe4921df8 CR3: 0000000014fc9000 CR4: 0000000000350ee0
Call Trace:
read_pages+0x5c5/0x8d0 mm/readahead.c:145
page_cache_ra_unbounded+0x61f/0x920 mm/readahead.c:238
do_page_cache_ra mm/readahead.c:267 [inline]
ondemand_readahead+0x65c/0x1190 mm/readahead.c:550
page_cache_sync_ra+0x1cb/0x200 mm/readahead.c:578
page_cache_sync_readahead include/linux/pagemap.h:864 [inline]
filemap_get_pages+0x29f/0x1920 mm/filemap.c:2442
filemap_read+0x2ca/0xe40 mm/filemap.c:2525
generic_file_read_iter+0x397/0x4f0 mm/filemap.c:2676
__kernel_read+0x58d/0xa90 fs/read_write.c:454
kernel_read+0x52/0x70 fs/read_write.c:472
prepare_binprm fs/exec.c:1650 [inline]
search_binary_handler fs/exec.c:1704 [inline]
exec_binprm fs/exec.c:1761 [inline]
bprm_execve fs/exec.c:1830 [inline]
bprm_execve+0x740/0x19a0 fs/exec.c:1792
do_execveat_common+0x626/0x7c0 fs/exec.c:1919
do_execveat fs/exec.c:1998 [inline]
__do_sys_execveat fs/exec.c:2074 [inline]
__se_sys_execveat fs/exec.c:2066 [inline]
__x64_sys_execveat+0xed/0x130 fs/exec.c:2066
do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47
entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x443c09
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffdd2359618 EFLAGS: 00000246 ORIG_RAX: 0000000000000142
RAX: ffffffffffffffda RBX: 00000000004004a0 RCX: 0000000000443c09
RDX: 0000000000000000 RSI: 0000000020000040 RDI: 0000000000000005
RBP: 00000000004034a0 R08: 0000000000000000 R09: 00000000004004a0
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000403530
R13: 0000000000000000 R14: 00000000004b1018 R15: 00000000004004a0
Modules linked in:
---[ end trace eb837301c73b908d ]---
RIP: 0010:fill_meta_index fs/squashfs/file.c:243 [inline]
RIP: 0010:read_blocklist fs/squashfs/file.c:332 [inline]
RIP: 0010:squashfs_readpage+0xa0d/0x2210 fs/squashfs/file.c:469
Code: 3c 24 31 d2 48 63 8c 24 b4 00 00 00 49 8b 47 c8 48 89 cf 48 c1 e1 0b c1 e7 0b 89 7c 24 4c 31 ff 48 89 44 24 60 48 63 44 24 70 <48> f7 f1 49 89 c6 89 c6 48 89 44 24 58 89 44 24 1c 89 44 24 48 e8
RSP: 0018:ffffc9000188f3e8 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000099 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff8221fc4d RDI: 0000000000000000
RBP: 000000000000000c R08: ffffffffffffffff R09: 000000000000000c
R10: ffffffff8221fc3e R11: 000000000000003f R12: 00000000000000de
R13: ffff888033290088 R14: 0000000000000000 R15: ffff888033290038
FS: 00000000024ae300(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f2f175e5030 CR3: 0000000014fc9000 CR4: 0000000000350ef0


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches

syzbot

unread,
May 3, 2021, 8:48:09 PMMay 3
to paskr...@gmail.com, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-and-tested-by: syzbot+e8f781...@syzkaller.appspotmail.com

Tested on:

commit: d33a6295 squashfs: fix divide error
git tree: https://linux.googlesource.com/linux/kernel/git/torvalds/linux refs/changes/76/10676/1
kernel config: https://syzkaller.appspot.com/x/.config?x=751a9df13cd00e8a
dashboard link: https://syzkaller.appspot.com/bug?extid=e8f781243ce16ac2f962
compiler:

Note: testing is done by a robot and is best-effort only.

慕冬亮

unread,
May 11, 2021, 4:53:49 AMMay 11
to syzbot+e8f781...@syzkaller.appspotmail.com, syzkaller-bugs
#syz dup: divide error in fill_meta_index

--
My best regards to you.

No System Is Safe!
Dongliang Mu

慕冬亮

unread,
May 11, 2021, 4:57:47 AMMay 11
to syzbot+e8f781...@syzkaller.appspotmail.com, syzkaller-bugs
The reasons to be duplicated:

1. The inline function (fill_meta_index, read_blocklist) makes
syzkaller extract different crashing functions. And the stack trace is
exactly the same.
2. The PoCs are the same;

--
My best regards to you.

No System Is Safe!
Dongliang Mu

Reply all
Reply to author
Forward
0 new messages