syzbot


divide error in fill_meta_index

Status: fixed on 2021/11/10 00:50
Subsystems: squashfs
[Documentation on labels]
Reported-by: syzbot+7b98870d4fec9447b951@syzkaller.appspotmail.com
Fix commit: d6e621de1fce squashfs: fix divide error in calculate_skip()
First crash: 1059d, last: 1059d
Cause bisection: the issue happens on the oldest tested release (bisect log)
Crash: divide error in squashfs_readpage (log)
Repro: C syz .config
  
Duplicate bugs (1)
duplicates (1):
Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
divide error in squashfs_readpage squashfs C inconclusive 1 1060d 1060d 26/26 closed as dup on 2021/05/11 08:53
Discussions (11)
Title Replies (including bot) Last reply
[PATCH 4.19 000/425] 4.19.191-rc1 review 438 (438) 2021/06/24 10:04
[PATCH 5.10 000/289] 5.10.38-rc1 review 304 (304) 2021/05/27 04:25
[PATCH 4.9 000/240] 4.9.269-rc1 review 245 (245) 2021/05/21 16:52
[PATCH 4.14 000/323] 4.14.233-rc1 review 326 (326) 2021/05/21 05:55
[PATCH 4.4 000/190] 4.4.269-rc1 review 196 (196) 2021/05/20 21:46
[PATCH 5.4 000/141] 5.4.120-rc1 review 152 (152) 2021/05/20 08:31
[PATCH 5.11 000/329] 5.11.22-rc1 review 336 (336) 2021/05/18 21:20
[PATCH 5.12 000/363] 5.12.5-rc1 review 377 (377) 2021/05/18 14:35
[patch 05/13] squashfs: fix divide error in calculate_skip() 1 (1) 2021/05/15 00:27
[PATCH] squashfs: fix divide error in calculate_skip() 1 (1) 2021/05/07 15:26
[syzbot] divide error in fill_meta_index 0 (1) 2021/05/05 07:42
Last patch testing requests (1)
Created Duration User Patch Repo Result
2021/05/05 08:37 18m paskripkin@gmail.com https://linux.googlesource.com/linux/kernel/git/torvalds/linux refs/changes/76/10676/1 OK

Sample crash report:
loop0: detected capacity change from 0 to 8
divide error: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 8375 Comm: syz-executor040 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+0x242/0xf50 fs/squashfs/file.c:243
Code: 28 00 74 08 4c 89 ff e8 4c 79 91 ff 49 8b 07 48 89 44 24 60 48 63 4c 24 44 48 c1 e1 0b 49 63 c6 31 d2 48 89 8c 24 b8 00 00 00 <48> f7 f1 48 89 c3 31 ff 89 de e8 3f e5 4a ff 48 89 5c 24 58 85 db
RSP: 0018:ffffc90000eff1c0 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 00000000000000de RCX: 0000000000000000
RDX: 0000000000000000 RSI: 00000000ffffff10 RDI: ffffc90000eff2a0
RBP: ffffc90000eff330 R08: ffffffff8233f543 R09: fffff94000180631
R10: fffff94000180631 R11: 0000000000000000 R12: ffff8880331dc520
R13: dffffc0000000000 R14: 0000000000000000 R15: ffff8880331dc4c0
FS:  0000000002199300(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055b45fc1d008 CR3: 0000000012688000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 read_blocklist+0x9f/0x320 fs/squashfs/file.c:332
 squashfs_readpage+0x4ce/0xba0 fs/squashfs/file.c:469
 read_pages+0x5d4/0x890 mm/readahead.c:145
 page_cache_ra_unbounded+0x82a/0x9a0 mm/readahead.c:238
 page_cache_sync_readahead include/linux/pagemap.h:864 [inline]
 filemap_get_pages+0x43d/0xd90 mm/filemap.c:2442
 filemap_read+0x39e/0x1030 mm/filemap.c:2525
 __kernel_read+0x596/0xa40 fs/read_write.c:454
 prepare_binprm fs/exec.c:1650 [inline]
 search_binary_handler fs/exec.c:1704 [inline]
 exec_binprm fs/exec.c:1761 [inline]
 bprm_execve+0x808/0x1470 fs/exec.c:1830
 do_execveat_common+0x487/0x5f0 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+0xcd/0xe0 fs/exec.c:2066
 do_syscall_64+0x3f/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:00007ffff066cd08 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 5a69392a838e0d97 ]---
RIP: 0010:fill_meta_index+0x242/0xf50 fs/squashfs/file.c:243
Code: 28 00 74 08 4c 89 ff e8 4c 79 91 ff 49 8b 07 48 89 44 24 60 48 63 4c 24 44 48 c1 e1 0b 49 63 c6 31 d2 48 89 8c 24 b8 00 00 00 <48> f7 f1 48 89 c3 31 ff 89 de e8 3f e5 4a ff 48 89 5c 24 58 85 db
RSP: 0018:ffffc90000eff1c0 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 00000000000000de RCX: 0000000000000000
RDX: 0000000000000000 RSI: 00000000ffffff10 RDI: ffffc90000eff2a0
RBP: ffffc90000eff330 R08: ffffffff8233f543 R09: fffff94000180631
R10: fffff94000180631 R11: 0000000000000000 R12: ffff8880331dc520
R13: dffffc0000000000 R14: 0000000000000000 R15: ffff8880331dc4c0
FS:  0000000002199300(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000560489adc160 CR3: 0000000012688000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/05/04 18:26 upstream d2b6f8a17919 09efdd63 .config console log report syz C ci-upstream-kasan-gce-smack-root divide error in fill_meta_index
* Struck through repros no longer work on HEAD.