syzbot


WARNING in ext2_fill_super

Status: upstream: reported C repro on 2022/08/26 16:53
Reported-by: syzbot+0f2f7e65a3007d39539f@syzkaller.appspotmail.com
Fix commit: d766f2d1e3e3 ext2: Add sanity checks for group and filesystem size e7c7fbb9a857 ext2: Use kvmalloc() for group descriptor array
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: 102d, last: 102d

Sample crash report:
loop0: detected capacity change from 0 to 15
Dev loop0: unable to read RDB block 15
 loop0: unable to read partition table
loop0: partition table beyond EOD, truncated
------------[ cut here ]------------
WARNING: CPU: 0 PID: 3025 at mm/page_alloc.c:5403 __alloc_pages+0x150/0x1fc mm/page_alloc.c:5403
Modules linked in:
CPU: 0 PID: 3025 Comm: syz-executor332 Not tainted 5.19.0-rc8-syzkaller-01618-g680fb5b009e8 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/20/2022
pstate: 20400005 (nzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : __alloc_pages+0x150/0x1fc mm/page_alloc.c:5403
lr : alloc_pages+0x2fc/0x404
sp : ffff80000fee3960
x29: ffff80000fee39a0 x28: 00000000000007c0 x27: ffff0000ca8a0800
x26: ffff80000ef11938 x25: ffff0000c5470000 x24: ffff80000ee71730
x23: 0000000000000000 x22: 0000000000000000 x21: 0000000000000000
x20: 0000000000000000 x19: 000000000000000c x18: 00000000000000c0
x17: 0000000000000009 x16: 0000000000000000 x15: 0000000000000000
x14: 0000000000000000 x13: 0000000000000005 x12: ffff80000d468290
x11: ff808000084ff6a0 x10: 0000000000000000 x9 : 0000000000000001
x8 : ffff80000d8c1000 x7 : ffff80000856455c x6 : 0000000000000000
x5 : 0000000000000000 x4 : 0000000000000002 x3 : 0000000000000000
x2 : 0000000000000000 x1 : 000000000000000c x0 : 0000000000040dc0
Call trace:
 __alloc_pages+0x150/0x1fc mm/page_alloc.c:5403
 alloc_pages+0x2fc/0x404
 kmalloc_order+0x34/0x104 mm/slab_common.c:945
 kmalloc_order_trace+0x2c/0x7c mm/slab_common.c:961
 kmalloc_large include/linux/slab.h:529 [inline]
 __kmalloc+0x2cc/0x374 mm/slub.c:4435
 kmalloc_array include/linux/slab.h:640 [inline]
 kcalloc include/linux/slab.h:671 [inline]
 ext2_fill_super+0xad0/0xfe0 fs/ext2/super.c:1085
 mount_bdev+0x1b8/0x210 fs/super.c:1367
 ext2_mount+0x44/0x58 fs/ext2/super.c:1465
 legacy_get_tree+0x30/0x74 fs/fs_context.c:610
 vfs_get_tree+0x40/0x140 fs/super.c:1497
 do_new_mount+0x1dc/0x4e4 fs/namespace.c:3040
 path_mount+0x358/0x8b0 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]
 __arm64_sys_mount+0x2f8/0x408 fs/namespace.c:3568
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall arch/arm64/kernel/syscall.c:52 [inline]
 el0_svc_common+0x138/0x220 arch/arm64/kernel/syscall.c:142
 do_el0_svc+0x48/0x154 arch/arm64/kernel/syscall.c:206
 el0_svc+0x58/0x14c arch/arm64/kernel/entry-common.c:624
 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:642
 el0t_64_sync+0x18c/0x190
irq event stamp: 12290
hardirqs last  enabled at (12289): [<ffff800008438d28>] mod_lruvec_page_state include/linux/vmstat.h:569 [inline]
hardirqs last  enabled at (12289): [<ffff800008438d28>] kmalloc_order+0xac/0x104 mm/slab_common.c:948
hardirqs last disabled at (12290): [<ffff80000bfa4314>] el1_dbg+0x24/0x5c arch/arm64/kernel/entry-common.c:395
softirqs last  enabled at (12146): [<ffff8000080102e4>] _stext+0x2e4/0x37c
softirqs last disabled at (12129): [<ffff800008101e20>] do_softirq_own_stack include/asm-generic/softirq_stack.h:10 [inline]
softirqs last disabled at (12129): [<ffff800008101e20>] invoke_softirq+0x70/0xbc kernel/softirq.c:452
---[ end trace 0000000000000000 ]---
EXT2-fs (loop0): error: not enough memory

Crashes (2):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-gce-arm64 2022/08/22 16:53 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 680fb5b009e8 26a13b38 .config log report syz C WARNING in ext2_fill_super
ci-upstream-gce-arm64 2022/08/22 16:43 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 680fb5b009e8 26a13b38 .config log report info WARNING in ext2_fill_super
* Struck through repros no longer work on HEAD.