syzbot


WARNING in iomap_iter

Status: upstream: reported C repro on 2021/11/08 23:46
Reported-by: syzbot+a8e049cd3abd342936b6@syzkaller.appspotmail.com
Fix commit: c490a0b5a4f3 loop: Check for overflow while configuring loop
Patched on: [ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce ci-upstream-kmsan-gce-386 ci-upstream-linux-next-kasan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb], missing on: [ci-qemu2-riscv64 ci-upstream-bpf-kasan-gce]
First crash: 330d, last: 2d22h

Cause bisection: the issue happens on the oldest tested release (bisect log)
Crash: WARNING in iomap_apply (log)
Repro: C syz .config
Patch testing requests:
Created Duration User Patch Repo Result
2022/08/23 15:36 15m code@siddh.me patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master OK log
2022/08/23 15:21 15m code@siddh.me patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master OK log
2022/08/21 11:48 15m code@siddh.me patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master OK log
2022/08/18 11:12 16m code@siddh.me patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master OK log
2022/08/18 11:01 10m code@siddh.me patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master report log

Sample crash report:
loop0: detected capacity change from 0 to 4
erofs: (device loop0): mounted with root inode @ nid 36.
------------[ cut here ]------------
WARNING: CPU: 1 PID: 3607 at fs/iomap/iter.c:35 iomap_iter+0x7f2/0x8a0 fs/iomap/iter.c:78
Modules linked in:
CPU: 1 PID: 3607 Comm: syz-executor219 Not tainted 6.0.0-rc6-syzkaller-00321-g105a36f3694e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022
RIP: 0010:iomap_iter_done fs/iomap/iter.c:35 [inline]
RIP: 0010:iomap_iter+0x7f2/0x8a0 fs/iomap/iter.c:78
Code: c4 40 5b 41 5c 41 5d 41 5e 41 5f 5d c3 e8 66 d9 7f ff 0f 0b e9 9e fe ff ff e8 5a d9 7f ff 0f 0b e9 d0 fe ff ff e8 4e d9 7f ff <0f> 0b e9 34 ff ff ff e8 42 d9 7f ff 0f 0b 41 bd fb ff ff ff eb bb
RSP: 0018:ffffc900037cf828 EFLAGS: 00010293
RAX: ffffffff8207b0b2 RBX: 0000000000000004 RCX: ffff88807dd18000
RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000004
RBP: 0000000000000004 R08: ffffffff8207afda R09: fffffbfff1c164fe
R10: fffffbfff1c164fe R11: 1ffffffff1c164fd R12: ffffc900037cf968
R13: 1ffff920006f9f32 R14: 1ffff920006f9f2c R15: dffffc0000000000
FS:  00005555564f6300(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffdced66000 CR3: 000000007151a000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 iomap_fiemap+0x1b9/0x9a0 fs/iomap/fiemap.c:80
 ioctl_fiemap fs/ioctl.c:219 [inline]
 do_vfs_ioctl+0x187f/0x29a0 fs/ioctl.c:810
 __do_sys_ioctl fs/ioctl.c:868 [inline]
 __se_sys_ioctl+0x83/0x170 fs/ioctl.c:856
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f7f771a1de9
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:00007ffdced653c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f7f771a1de9
RDX: 00000000200002c0 RSI: 00000000c020660b RDI: 0000000000000005
RBP: 00007f7f771615e0 R08: 0000000000000000 R09: 0000000000000000
R10: 00007ffdced65280 R11: 0000000000000246 R12: 00007f7f77161670
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
 </TASK>

Fix bisection attempts:
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-selinux-root 2022/06/15 19:22 upstream 979086f5e006 9e8eaa75 .config log report syz C
ci-upstream-kasan-gce-selinux-root 2022/05/15 08:26 upstream 2fe1020d73ca 9e8eaa75 .config log report syz C
ci-upstream-kasan-gce-selinux-root 2022/04/15 04:21 upstream 028192fea1de 9e8eaa75 .config log report syz C
* Struck through repros no longer work on HEAD.
Crashes (51):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-fs 2022/09/26 02:06 upstream 105a36f3694e 0042f2b4 .config log report syz C WARNING in iomap_iter
ci-upstream-kasan-gce-root 2022/07/29 17:53 upstream 6e2c0490769e fef302b1 .config log report syz C WARNING in iomap_iter
ci-upstream-kasan-gce 2022/06/21 12:51 upstream 78ca55889a54 0fc5c330 .config log report syz C WARNING in iomap_iter
ci-upstream-kasan-gce-selinux-root 2022/03/16 01:03 upstream 56e337f2cf13 9e8eaa75 .config log report syz C WARNING in iomap_iter
ci-upstream-kasan-gce-smack-root 2022/02/12 20:40 upstream 83e396641110 8b9ca619 .config log report syz C WARNING in iomap_iter
ci-upstream-kasan-gce-386 2022/07/02 01:56 upstream a175eca0f3d7 1434eec0 .config log report syz C WARNING in iomap_iter
ci-upstream-linux-next-kasan-gce-root 2022/02/20 08:03 linux-next ef6b35306dd8 3cd800e4 .config log report syz C WARNING in iomap_iter
ci-upstream-gce-arm64 2022/09/25 06:51 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c194837ebb57 0042f2b4 .config log report syz C WARNING in iomap_iter
ci-upstream-kasan-gce-root 2022/07/22 09:03 upstream 68e77ffbfd06 5e6028b9 .config log report syz WARNING in iomap_iter
ci2-upstream-fs 2022/09/28 09:49 upstream 46452d3786a8 75c78242 .config log report info WARNING in iomap_iter
ci-qemu-upstream 2022/09/24 15:24 upstream a63f2e7cb110 0042f2b4 .config log report info WARNING in iomap_iter
ci2-upstream-fs 2022/09/23 02:09 upstream dc164f4fb00a 0042f2b4 .config log report info WARNING in iomap_iter
ci-upstream-kasan-gce-smack-root 2022/09/16 00:16 upstream 3245cb65fd91 dd9a85ff .config log report info WARNING in iomap_iter
ci-upstream-kasan-gce-smack-root 2022/08/23 17:19 upstream 072e51356cd5 cea8b0f7 .config log report info WARNING in iomap_iter
ci-upstream-kasan-gce 2022/08/15 15:33 upstream 7ebfc85e2cd7 8dfcaa3d .config log report info WARNING in iomap_iter
ci-upstream-kasan-gce-selinux-root 2022/08/07 08:20 upstream 200e340f2196 88e3a122 .config log report info WARNING in iomap_iter
ci-upstream-kasan-gce 2022/08/04 05:47 upstream 200e340f2196 1c9013ac .config log report info WARNING in iomap_iter
ci-upstream-kasan-gce-root 2022/08/01 07:21 upstream 334c0ef6429f fef302b1 .config log report info WARNING in iomap_iter
ci-upstream-kasan-gce-smack-root 2022/07/30 01:53 upstream 6e2c0490769e fef302b1 .config log report info WARNING in iomap_iter
ci-upstream-kasan-gce 2022/07/29 04:20 upstream 33ea1340bafe fb95c74d .config log report info WARNING in iomap_iter
ci-upstream-kasan-gce-selinux-root 2022/07/23 10:04 upstream 4ba1329cbb94 22343af4 .config log report info WARNING in iomap_iter
ci-upstream-kasan-gce-smack-root 2022/07/22 18:58 upstream 68e77ffbfd06 22343af4 .config log report info WARNING in iomap_iter
ci-upstream-kasan-gce 2022/07/21 14:29 upstream 353f7988dd84 6e67af9d .config log report info WARNING in iomap_iter
ci-upstream-kasan-gce-smack-root 2022/07/16 06:09 upstream 9b59ec8d50a1 95cb00d1 .config log report info WARNING in iomap_iter
ci-upstream-kasan-gce-selinux-root 2022/07/10 09:11 upstream b1c428b6c368 b5765a15 .config log report info WARNING in iomap_iter
ci-upstream-kasan-gce 2022/06/22 04:50 upstream ca1fdab7fd27 0fc5c330 .config log report info WARNING in iomap_iter
ci-upstream-kasan-gce-root 2022/06/19 08:55 upstream 354c6e071be9 8f633d84 .config log report info WARNING in iomap_iter
ci-upstream-kasan-gce 2022/06/19 08:47 upstream 354c6e071be9 8f633d84 .config log report info WARNING in iomap_iter
ci-upstream-kasan-gce-smack-root 2022/06/18 09:17 upstream 4b35035bcf80 8f633d84 .config log report info WARNING in iomap_iter
ci-upstream-kasan-gce 2022/05/16 15:25 upstream 42226c989789 744a39e2 .config log report info WARNING in iomap_iter
ci-upstream-kasan-gce-smack-root 2022/02/12 22:04 upstream 83e396641110 8b9ca619 .config log report info WARNING in iomap_iter
ci-upstream-kasan-gce 2022/01/10 22:00 upstream 133d9c53c9dc ddb0ab8c .config log report info WARNING in iomap_iter
ci-upstream-kasan-gce 2021/12/07 12:16 upstream f80ef9e49fdf 0230ba3e .config log report info WARNING in iomap_iter
ci-upstream-kasan-gce 2021/11/24 17:40 upstream 5d9f4cf36721 545ab074 .config log report info WARNING in iomap_iter
ci-upstream-kasan-gce-386 2022/08/07 08:29 upstream 200e340f2196 88e3a122 .config log report info WARNING in iomap_iter
ci-qemu-upstream-386 2021/11/12 13:45 upstream 5833291ab6de 75b04091 .config log report info WARNING in iomap_iter
ci-upstream-kasan-gce-386 2021/11/04 23:43 upstream 7ddb58cb0eca 4c1be0be .config log report info WARNING in iomap_iter
ci-upstream-linux-next-kasan-gce-root 2022/09/02 05:27 linux-next e47eb90a0a9a a805568e .config log report info WARNING in iomap_iter
ci-upstream-linux-next-kasan-gce-root 2022/07/09 20:26 linux-next cb71b93c2dc3 b5765a15 .config log report info WARNING in iomap_iter
ci-upstream-linux-next-kasan-gce-root 2022/02/12 21:54 linux-next ef6b35306dd8 8b9ca619 .config log report info WARNING in iomap_iter
ci-upstream-linux-next-kasan-gce-root 2021/11/28 05:40 linux-next f81e94e91878 63eeac02 .config log report info WARNING in iomap_iter
ci-upstream-gce-arm64 2022/09/17 01:52 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a6b443748715 dd9a85ff .config log report info WARNING in iomap_iter
ci-upstream-gce-arm64 2022/09/16 01:20 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a6b443748715 dd9a85ff .config log report info WARNING in iomap_iter
ci-upstream-gce-arm64 2022/09/12 05:09 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a6b443748715 356d8217 .config log report info WARNING in iomap_iter
ci-upstream-gce-arm64 2022/09/03 18:50 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 85413d1e802e 28811d0a .config log report info WARNING in iomap_iter
ci-upstream-gce-arm64 2022/08/28 20:00 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a41a877bc12d 07177916 .config log report info WARNING in iomap_iter
ci-upstream-gce-arm64 2022/08/25 03:43 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a41a877bc12d 514514f6 .config log report info WARNING in iomap_iter
* Struck through repros no longer work on HEAD.