Hello, syzbot found the following issue on:
HEAD commit: 7a19f0cc94ad Merge branch 'for-next/core' into for-kernelci git tree: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci console output: https://syzkaller.appspot.com/x/log.txt?x=149de721580000 kernel config: https://syzkaller.appspot.com/x/.config?x=6602d83d2f34eb80 dashboard link: https://syzkaller.appspot.com/bug?extid=c8564fc0a96e3ecbe4d4 compiler: Debian clang version 22.1.8 (1~deb13u4), Debian LLD 22.1.8 userspace arch: arm64 syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16c56469580000 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1330b721580000 Downloadable assets: disk image: https://storage.googleapis.com/syzbot-assets/26f2e4202da9/disk-7a19f0cc.raw.xz vmlinux: https://storage.googleapis.com/syzbot-assets/1e23a9081d19/vmlinux-7a19f0cc.xz kernel image: https://storage.googleapis.com/syzbot-assets/b51f551829ee/Image-7a19f0cc.gz.xz AI-generated root cause summary: In drivers/md/dm-cache-target.c, calculate_discard_block_size() doubles discard_block_size beyond 32 bits when origin_sectors is very large, and calls sector_div() which truncates the divisor to a 32-bit uint32_t, resulting in division by zero. On arm64, division by zero architecturally yields 0, setting discard_nr_blocks to 0 and triggering a zero-size vzalloc() that hits WARN_ON_ONCE(!size) in __vmalloc_node_range_noprof; the error is subsequently caught by dm-cache-target and cleanly returned as -ENOMEM. On x86_64, the same division by zero triggers an unhandled #DE divide error kernel oops. full analysis: https://syzkaller.appspot.com/x/ai_root_cause?x=c8564fc0a96e3ecbe4d4 IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: [email protected] ------------[ cut here ]------------ WARNING: mm/vmalloc.c:4037 at __vmalloc_node_range_noprof+0xe7c/0xe9c mm/vmalloc.c:-1, CPU#1: syz.0.17/4933 Modules linked in: CPU: 1 UID: 0 PID: 4933 Comm: syz.0.17 Not tainted syzkaller #0 PREEMPT Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/14/2026 pstate: 83400005 (Nzcv daif +PAN -UAO +TCO +DIT -SSBS BTYPE=--) pc : __vmalloc_node_range_noprof+0xe7c/0xe9c mm/vmalloc.c:-1 lr : __vmalloc_node_range_noprof+0xe78/0xe9c mm/vmalloc.c:4037 sp : ffff800098787520 x29: ffff800098787660 x28: 00e8000000000703 x27: 0000000000000000 x26: 0000000000000000 x25: ffff7000130f0ec0 x24: fffffdffbf800000 x23: 0000000000000000 x22: 00000000ffffffff x21: 0000000000000000 x20: 0000000000000dc0 x19: dfff800000000000 x18: ffff8001237d4000 x17: ffff0001acf92e25 x16: ffff0000ca311d94 x15: 0000000000000009 x14: 00000000006328cc x13: 0000000000000001 x12: 0000000000000000 x11: ffffc1ffbf800000 x10: 000000f000000000 x9 : 0000000000000000 x8 : 0000000000000000 x7 : 00000000ffffffff x6 : 0000000000000000 x5 : 00e8000000000703 x4 : 0000000000000dc0 x3 : ffff800080aa2768 x2 : 0000000000000000 x1 : ffff0000ca311d80 x0 : 0000000000000000 Call trace: __vmalloc_node_range_noprof+0xe7c/0xe9c mm/vmalloc.c:-1 (P) __vmalloc_node_noprof+0xec/0x14c mm/vmalloc.c:4165 vzalloc_noprof+0x3c/0x4c mm/vmalloc.c:4243 alloc_bitset drivers/md/dm-cache-policy-internal.h:126 [inline] cache_create drivers/md/dm-cache-target.c:2529 [inline] cache_ctr+0x1258/0x1f1c drivers/md/dm-cache-target.c:2649 dm_table_add_target+0x44c/0xb18 drivers/md/dm-table.c:749 populate_table drivers/md/dm-ioctl.c:1602 [inline] table_load+0x27c/0x764 drivers/md/dm-ioctl.c:1645 ctl_ioctl drivers/md/dm-ioctl.c:2221 [inline] dm_ctl_ioctl+0x884/0xbbc drivers/md/dm-ioctl.c:2243 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:597 [inline] __se_sys_ioctl fs/ioctl.c:583 [inline] __arm64_sys_ioctl+0x154/0x1cc fs/ioctl.c:583 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x244 arch/arm64/kernel/syscall.c:49 el0_svc_common+0xec/0x23c arch/arm64/kernel/syscall.c:121 do_el0_svc+0x4c/0x5c arch/arm64/kernel/syscall.c:140 el0_svc+0x60/0x1d8 arch/arm64/kernel/entry-common.c:796 el0t_64_sync_handler+0x44/0x104 arch/arm64/kernel/entry-common.c:815 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:606 irq event stamp: 8668 hardirqs last enabled at (8667): [<ffff800080ade8fc>] seqcount_lockdep_reader_access+0x68/0xcc include/linux/seqlock.h:75 hardirqs last disabled at (8668): [<ffff8000868b91fc>] el1_brk64+0x20/0x54 arch/arm64/kernel/entry-common.c:483 softirqs last enabled at (8614): [<ffff80008013c764>] local_bh_enable include/linux/bottom_half.h:33 [inline] softirqs last enabled at (8614): [<ffff80008013c764>] put_cpu_fpsimd_context arch/arm64/kernel/fpsimd.c:251 [inline] softirqs last enabled at (8614): [<ffff80008013c764>] kernel_neon_begin+0x294/0x400 arch/arm64/kernel/fpsimd.c:1924 softirqs last disabled at (8612): [<ffff80008013c5ec>] local_bh_disable include/linux/bottom_half.h:20 [inline] softirqs last disabled at (8612): [<ffff80008013c5ec>] get_cpu_fpsimd_context arch/arm64/kernel/fpsimd.c:234 [inline] softirqs last disabled at (8612): [<ffff80008013c5ec>] kernel_neon_begin+0x11c/0x400 arch/arm64/kernel/fpsimd.c:1883 ---[ end trace 0000000000000000 ]--- device-mapper: table: 248:0: cache: could not allocate discard bitset (-ENOMEM) device-mapper: ioctl: error adding target to table --- 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 [email protected]. syzbot will keep track of this issue. See: https://goo.gl/tpsmEJ#status for how to communicate with syzbot. If the report is already addressed, let syzbot know by replying with: #syz fix: exact-commit-title If you want syzbot to run the reproducer, reply with: #syz test: git://repo/address.git branch-or-commit-hash If you attach or paste a git patch, syzbot will apply it before testing. If you want to overwrite report's subsystems, reply with: #syz set subsystems: new-subsystem (See the list of subsystem names on the web dashboard) If the report is a duplicate of another one, reply with: #syz dup: exact-subject-of-another-report If you want to undo deduplication, reply with: #syz undup
