syzbot


WARNING in erofs_iget

Status: upstream: reported C repro on 2022/09/06 09:17
Reported-by: syzbot+f966c13b1b4fc0403b19@syzkaller.appspotmail.com
Fix commit: 1dd73601a1cb erofs: fix order >= MAX_ORDER warning due to crafted negative i_size
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-kasan-gce 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]
First crash: 157d, last: 103d

Sample crash report:
loop0: detected capacity change from 0 to 4
Dev loop0: unable to read RDB block 4
 loop0: unable to read partition table
loop0: partition table beyond EOD, truncated
------------[ cut here ]------------
WARNING: CPU: 0 PID: 3611 at mm/page_alloc.c:5491 __alloc_pages+0x39e/0x510 mm/page_alloc.c:5491
Modules linked in:
CPU: 0 PID: 3611 Comm: syz-executor339 Not tainted 6.0.0-rc3-syzkaller-00328-g42cf58c272ee #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022
RIP: 0010:__alloc_pages+0x39e/0x510 mm/page_alloc.c:5491
Code: ff ff 00 0f 84 33 fe ff ff 80 ce 01 e9 2b fe ff ff 83 fe 0a 0f 86 3e fd ff ff 80 3d 28 9c 0b 0c 00 75 09 c6 05 1f 9c 0b 0c 01 <0f> 0b 45 31 f6 e9 8d fe ff ff 65 ff 05 a1 76 44 7e 48 c7 c0 a0 21
RSP: 0018:ffffc9000396f8c0 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 1ffff9200072df19 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000034 RDI: 0000000000000000
RBP: 0000000000040cc0 R08: 0000000000000007 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000055 R12: 0000000000000034
R13: 0000000000000000 R14: 0000000000000000 R15: 1ffff9200072df57
FS:  0000555556730300(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffde3e9b000 CR3: 00000000732b1000 CR4: 0000000000350ef0
Call Trace:
 <TASK>
 alloc_pages+0x1a6/0x270 mm/mempolicy.c:2270
 kmalloc_order+0x34/0xf0 mm/slab_common.c:930
 kmalloc_order_trace+0x13/0x120 mm/slab_common.c:946
 kmalloc include/linux/slab.h:605 [inline]
 erofs_fill_symlink fs/erofs/inode.c:222 [inline]
 erofs_fill_inode fs/erofs/inode.c:273 [inline]
 erofs_iget+0x187c/0x26f0 fs/erofs/inode.c:351
 erofs_fc_fill_super+0x114b/0x21b0 fs/erofs/super.c:755
 get_tree_bdev+0x440/0x760 fs/super.c:1323
 vfs_get_tree+0x89/0x2f0 fs/super.c:1530
 do_new_mount fs/namespace.c:3040 [inline]
 path_mount+0x1326/0x1e20 fs/namespace.c:3370
 do_mount fs/namespace.c:3383 [inline]
 __do_sys_mount fs/namespace.c:3591 [inline]
 __se_sys_mount fs/namespace.c:3568 [inline]
 __x64_sys_mount+0x27f/0x300 fs/namespace.c:3568
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fee22a3317a
Code: 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 a5 00 00 00 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:00007ffde3e9a378 EFLAGS: 00000286 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ffde3e9a3d0 RCX: 00007fee22a3317a
RDX: 0000000020000000 RSI: 0000000020000040 RDI: 00007ffde3e9a390
RBP: 00007ffde3e9a390 R08: 00007ffde3e9a3d0 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000286 R12: 0000000020000230
R13: 0000000000000003 R14: 0000000000000004 R15: 0000000000000002
 </TASK>

Crashes (6):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci-upstream-kasan-gce-root 2022/09/03 22:57 upstream 42cf58c272ee 28811d0a .config strace log report syz C [disk image] [vmlinux] WARNING in erofs_iget
ci-upstream-kasan-gce-smack-root 2022/09/02 09:29 upstream 42e66b1cc3a0 a805568e .config strace log report syz C WARNING in erofs_iget
ci-upstream-gce-arm64 2022/09/02 10:25 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 85413d1e802e a805568e .config console log report syz C WARNING in erofs_iget
ci-upstream-kasan-gce-smack-root 2022/09/02 09:13 upstream 42e66b1cc3a0 a805568e .config console log report info WARNING in erofs_iget
ci-upstream-gce-arm64 2022/10/26 06:37 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 1984aebd .config console log report info [disk image] [vmlinux] WARNING in erofs_iget
ci-upstream-gce-arm64 2022/09/05 17:31 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 85413d1e802e 922294ab .config console log report info WARNING in erofs_iget
* Struck through repros no longer work on HEAD.