EXT4-fs error (device loop0): ext4_get_group_desc:277: comm syz-executor.0: block_group >= groups_count - block_group = 4294963226, groups_count = 1 ================================================================== BUG: KASAN: null-ptr-deref in instrument_atomic_read_write include/linux/instrumented.h:101 [inline] BUG: KASAN: null-ptr-deref in atomic_try_cmpxchg_acquire include/asm-generic/atomic-instrumented.h:705 [inline] BUG: KASAN: null-ptr-deref in queued_spin_lock include/asm-generic/qspinlock.h:82 [inline] BUG: KASAN: null-ptr-deref in do_raw_spin_lock include/linux/spinlock.h:183 [inline] BUG: KASAN: null-ptr-deref in __raw_spin_lock include/linux/spinlock_api_smp.h:143 [inline] BUG: KASAN: null-ptr-deref in _raw_spin_lock+0x97/0x1b0 kernel/locking/spinlock.c:151 Write of size 4 at addr 0000000000000000 by task syz-executor.0/13829 CPU: 1 PID: 13829 Comm: syz-executor.0 Not tainted 5.10.188-syzkaller-989219-gd96fc5f29172 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack_lvl+0x1e2/0x24b lib/dump_stack.c:118 __kasan_report mm/kasan/report.c:439 [inline] kasan_report+0x167/0x1c0 mm/kasan/report.c:452 kasan_check_range+0x293/0x2a0 mm/kasan/generic.c:189 __kasan_check_write+0x14/0x20 mm/kasan/shadow.c:37 instrument_atomic_read_write include/linux/instrumented.h:101 [inline] atomic_try_cmpxchg_acquire include/asm-generic/atomic-instrumented.h:705 [inline] queued_spin_lock include/asm-generic/qspinlock.h:82 [inline] do_raw_spin_lock include/linux/spinlock.h:183 [inline] __raw_spin_lock include/linux/spinlock_api_smp.h:143 [inline] _raw_spin_lock+0x97/0x1b0 kernel/locking/spinlock.c:151 spin_lock include/linux/spinlock.h:354 [inline] ext4_mb_release_context fs/ext4/mballoc.c:4985 [inline] ext4_mb_new_blocks+0x2025/0x43f0 fs/ext4/mballoc.c:5191 ext4_ext_map_blocks+0x190e/0x6be0 fs/ext4/extents.c:4281 ext4_map_blocks+0xaa7/0x1ec0 fs/ext4/inode.c:646 _ext4_get_block+0x21b/0x610 fs/ext4/inode.c:793 ext4_get_block+0x39/0x50 fs/ext4/inode.c:810 ext4_block_write_begin+0x61e/0x13b0 fs/ext4/inode.c:1077 ext4_write_begin+0x6fa/0x1730 ext4_da_write_begin+0x49d/0xf60 fs/ext4/inode.c:3021 generic_perform_write+0x2cd/0x570 mm/filemap.c:3506 ext4_buffered_write_iter+0x482/0x610 fs/ext4/file.c:271 ext4_file_write_iter+0x193/0x1c80 fs/ext4/file.c:685 __kernel_write+0x5ab/0x9d0 fs/read_write.c:550 dump_emit+0x261/0x3a0 fs/coredump.c:849 dump_user_range+0x71/0x1a0 fs/coredump.c:902 elf_core_dump+0x33bd/0x3c10 fs/binfmt_elf.c:2287 do_coredump+0x1eb8/0x2d60 fs/coredump.c:811 get_signal+0x102c/0x1410 kernel/signal.c:2768 arch_do_signal_or_restart+0xbd/0x17c0 arch/x86/kernel/signal.c:805 handle_signal_work kernel/entry/common.c:145 [inline] exit_to_user_mode_loop+0x9b/0xd0 kernel/entry/common.c:169 exit_to_user_mode_prepare kernel/entry/common.c:199 [inline] irqentry_exit_to_user_mode+0x55/0x80 kernel/entry/common.c:287 irqentry_exit+0x12/0x60 kernel/entry/common.c:375 exc_page_fault+0x33d/0x5b0 arch/x86/mm/fault.c:1521 asm_exc_page_fault+0x1e/0x30 arch/x86/include/asm/idtentry.h:571 RIP: 0033:0x0 Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6. RSP: 002b:0000000020000473 EFLAGS: 00010217 RAX: 0000000000000000 RBX: 0000000000000058 RCX: 00007fc388a9f959 RDX: 00007fc388621fb0 RSI: 0000000000000058 RDI: 00007fc388621fb0 RBP: 00007fc388afbc88 R08: 0000000000000000 R09: 0000000000000058 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007fc388bbef80 R15: 00007fffbce0bfe8 ================================================================== BUG: kernel NULL pointer dereference, address: 0000000000000000 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page PGD 10f65f067 P4D 10f65f067 PUD 110e53067 PMD 0 Oops: 0002 [#1] PREEMPT SMP KASAN CPU: 1 PID: 13829 Comm: syz-executor.0 Tainted: G B 5.10.188-syzkaller-989219-gd96fc5f29172 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023 RIP: 0010:atomic_try_cmpxchg_acquire include/asm-generic/atomic-instrumented.h:707 [inline] RIP: 0010:queued_spin_lock include/asm-generic/qspinlock.h:82 [inline] RIP: 0010:do_raw_spin_lock include/linux/spinlock.h:183 [inline] RIP: 0010:__raw_spin_lock include/linux/spinlock_api_smp.h:143 [inline] RIP: 0010:_raw_spin_lock+0xba/0x1b0 kernel/locking/spinlock.c:151 Code: 00 00 e8 a9 4e f8 fc 4c 89 ff be 04 00 00 00 e8 9c 4e f8 fc 43 0f b6 04 26 84 c0 0f 85 aa 00 00 00 8b 44 24 20 b9 01 00 00 00 41 0f b1 4d 00 75 33 48 c7 04 24 0e 36 e0 45 49 c7 04 1c 00 00 RSP: 0018:ffffc900029b5ee0 EFLAGS: 00010297 RAX: 0000000000000000 RBX: 1ffff92000536bdc RCX: 0000000000000001 RDX: 0000000000000001 RSI: 0000000000000004 RDI: ffffc900029b5f00 RBP: ffffc900029b5f70 R08: dffffc0000000000 R09: 0000000000000003 R10: fffff52000536be0 R11: dffffc0000000001 R12: dffffc0000000000 R13: 0000000000000000 R14: 1ffff92000536be0 R15: ffffc900029b5f00 FS: 00007fc3886226c0(0000) GS:ffff8881f7300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 000000010ded4000 CR4: 00000000003506a0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: spin_lock include/linux/spinlock.h:354 [inline] ext4_mb_release_context fs/ext4/mballoc.c:4985 [inline] ext4_mb_new_blocks+0x2025/0x43f0 fs/ext4/mballoc.c:5191 ext4_ext_map_blocks+0x190e/0x6be0 fs/ext4/extents.c:4281 ext4_map_blocks+0xaa7/0x1ec0 fs/ext4/inode.c:646 _ext4_get_block+0x21b/0x610 fs/ext4/inode.c:793 ext4_get_block+0x39/0x50 fs/ext4/inode.c:810 ext4_block_write_begin+0x61e/0x13b0 fs/ext4/inode.c:1077 ext4_write_begin+0x6fa/0x1730 ext4_da_write_begin+0x49d/0xf60 fs/ext4/inode.c:3021 generic_perform_write+0x2cd/0x570 mm/filemap.c:3506 ext4_buffered_write_iter+0x482/0x610 fs/ext4/file.c:271 ext4_file_write_iter+0x193/0x1c80 fs/ext4/file.c:685 __kernel_write+0x5ab/0x9d0 fs/read_write.c:550 dump_emit+0x261/0x3a0 fs/coredump.c:849 dump_user_range+0x71/0x1a0 fs/coredump.c:902 elf_core_dump+0x33bd/0x3c10 fs/binfmt_elf.c:2287 do_coredump+0x1eb8/0x2d60 fs/coredump.c:811 get_signal+0x102c/0x1410 kernel/signal.c:2768 arch_do_signal_or_restart+0xbd/0x17c0 arch/x86/kernel/signal.c:805 handle_signal_work kernel/entry/common.c:145 [inline] exit_to_user_mode_loop+0x9b/0xd0 kernel/entry/common.c:169 exit_to_user_mode_prepare kernel/entry/common.c:199 [inline] irqentry_exit_to_user_mode+0x55/0x80 kernel/entry/common.c:287 irqentry_exit+0x12/0x60 kernel/entry/common.c:375 exc_page_fault+0x33d/0x5b0 arch/x86/mm/fault.c:1521 asm_exc_page_fault+0x1e/0x30 arch/x86/include/asm/idtentry.h:571 RIP: 0033:0x0 Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6. RSP: 002b:0000000020000473 EFLAGS: 00010217 RAX: 0000000000000000 RBX: 0000000000000058 RCX: 00007fc388a9f959 RDX: 00007fc388621fb0 RSI: 0000000000000058 RDI: 00007fc388621fb0 RBP: 00007fc388afbc88 R08: 0000000000000000 R09: 0000000000000058 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007fc388bbef80 R15: 00007fffbce0bfe8 Modules linked in: CR2: 0000000000000000 ---[ end trace b61d6ea0681d1b18 ]--- RIP: 0010:atomic_try_cmpxchg_acquire include/asm-generic/atomic-instrumented.h:707 [inline] RIP: 0010:queued_spin_lock include/asm-generic/qspinlock.h:82 [inline] RIP: 0010:do_raw_spin_lock include/linux/spinlock.h:183 [inline] RIP: 0010:__raw_spin_lock include/linux/spinlock_api_smp.h:143 [inline] RIP: 0010:_raw_spin_lock+0xba/0x1b0 kernel/locking/spinlock.c:151 Code: 00 00 e8 a9 4e f8 fc 4c 89 ff be 04 00 00 00 e8 9c 4e f8 fc 43 0f b6 04 26 84 c0 0f 85 aa 00 00 00 8b 44 24 20 b9 01 00 00 00 41 0f b1 4d 00 75 33 48 c7 04 24 0e 36 e0 45 49 c7 04 1c 00 00 RSP: 0018:ffffc900029b5ee0 EFLAGS: 00010297 RAX: 0000000000000000 RBX: 1ffff92000536bdc RCX: 0000000000000001 RDX: 0000000000000001 RSI: 0000000000000004 RDI: ffffc900029b5f00 RBP: ffffc900029b5f70 R08: dffffc0000000000 R09: 0000000000000003 R10: fffff52000536be0 R11: dffffc0000000001 R12: dffffc0000000000 R13: 0000000000000000 R14: 1ffff92000536be0 R15: ffffc900029b5f00 FS: 00007fc3886226c0(0000) GS:ffff8881f7300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 000000010ded4000 CR4: 00000000003506a0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess): 0: 00 00 add %al,(%rax) 2: e8 a9 4e f8 fc call 0xfcf84eb0 7: 4c 89 ff mov %r15,%rdi a: be 04 00 00 00 mov $0x4,%esi f: e8 9c 4e f8 fc call 0xfcf84eb0 14: 43 0f b6 04 26 movzbl (%r14,%r12,1),%eax 19: 84 c0 test %al,%al 1b: 0f 85 aa 00 00 00 jne 0xcb 21: 8b 44 24 20 mov 0x20(%rsp),%eax 25: b9 01 00 00 00 mov $0x1,%ecx * 2a: f0 41 0f b1 4d 00 lock cmpxchg %ecx,0x0(%r13) <-- trapping instruction 30: 75 33 jne 0x65 32: 48 c7 04 24 0e 36 e0 movq $0x45e0360e,(%rsp) 39: 45 3a: 49 rex.WB 3b: c7 .byte 0xc7 3c: 04 1c add $0x1c,%al