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/3151 CPU: 1 PID: 3151 Comm: syz-executor.0 Not tainted 5.10.231-syzkaller-1004756-g4055d754db6f #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 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:5001 [inline] ext4_mb_new_blocks+0x1825/0x43e0 fs/ext4/mballoc.c:5284 ext4_ext_map_blocks+0x1a00/0x6ee0 fs/ext4/extents.c:4333 ext4_map_blocks+0xa65/0x1d10 fs/ext4/inode.c:673 _ext4_get_block+0x21b/0x610 fs/ext4/inode.c:816 ext4_get_block+0x39/0x50 fs/ext4/inode.c:833 __block_write_begin_int+0x5c1/0x1600 fs/buffer.c:2042 __block_write_begin+0x30/0x40 fs/buffer.c:2092 ext4_try_to_write_inline_data+0x7eb/0x1230 fs/ext4/inline.c:751 ext4_write_begin+0x247/0x1730 fs/ext4/inode.c:1191 ext4_da_write_begin+0x49d/0xf60 fs/ext4/inode.c:3032 generic_perform_write+0x2cd/0x570 mm/filemap.c:3509 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 elf_core_dump+0x2d99/0x3c10 fs/binfmt_elf.c:2245 do_coredump+0x1eb8/0x2d60 fs/coredump.c:811 get_signal+0x102c/0x1410 kernel/signal.c:2779 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+0x4e/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:1487 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: 00007f67aceff959 RDX: 00007f67aca81fb0 RSI: 0000000000000058 RDI: 00007f67aca81fb0 RBP: 00007f67acf5bc88 R08: 0000000000000000 R09: 0000000000000058 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f67ad01ef80 R15: 00007ffec4653958 ================================================================== BUG: kernel NULL pointer dereference, address: 0000000000000000 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page PGD 11c099067 P4D 11c099067 PUD 12258f067 PMD 0 Oops: 0002 [#1] PREEMPT SMP KASAN CPU: 1 PID: 3151 Comm: syz-executor.0 Tainted: G B 5.10.231-syzkaller-1004756-g4055d754db6f #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 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 d9 11 f5 fc 4c 89 ff be 04 00 00 00 e8 cc 11 f5 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:ffffc9000237dca0 EFLAGS: 00010297 RAX: 0000000000000000 RBX: 1ffff9200046fb94 RCX: 0000000000000001 RDX: 0000000000000001 RSI: 0000000000000004 RDI: ffffc9000237dcc0 RBP: ffffc9000237dd30 R08: dffffc0000000000 R09: 0000000000000003 R10: fffff5200046fb98 R11: dffffc0000000001 R12: dffffc0000000000 R13: 0000000000000000 R14: 1ffff9200046fb98 R15: ffffc9000237dcc0 FS: 00007f67aca826c0(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 00000001065f2000 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:5001 [inline] ext4_mb_new_blocks+0x1825/0x43e0 fs/ext4/mballoc.c:5284 ext4_ext_map_blocks+0x1a00/0x6ee0 fs/ext4/extents.c:4333 ext4_map_blocks+0xa65/0x1d10 fs/ext4/inode.c:673 _ext4_get_block+0x21b/0x610 fs/ext4/inode.c:816 ext4_get_block+0x39/0x50 fs/ext4/inode.c:833 __block_write_begin_int+0x5c1/0x1600 fs/buffer.c:2042 __block_write_begin+0x30/0x40 fs/buffer.c:2092 ext4_try_to_write_inline_data+0x7eb/0x1230 fs/ext4/inline.c:751 ext4_write_begin+0x247/0x1730 fs/ext4/inode.c:1191 ext4_da_write_begin+0x49d/0xf60 fs/ext4/inode.c:3032 generic_perform_write+0x2cd/0x570 mm/filemap.c:3509 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 elf_core_dump+0x2d99/0x3c10 fs/binfmt_elf.c:2245 do_coredump+0x1eb8/0x2d60 fs/coredump.c:811 get_signal+0x102c/0x1410 kernel/signal.c:2779 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+0x4e/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:1487 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: 00007f67aceff959 RDX: 00007f67aca81fb0 RSI: 0000000000000058 RDI: 00007f67aca81fb0 RBP: 00007f67acf5bc88 R08: 0000000000000000 R09: 0000000000000058 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f67ad01ef80 R15: 00007ffec4653958 Modules linked in: CR2: 0000000000000000 ---[ end trace 163f123cba6876e0 ]--- 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 d9 11 f5 fc 4c 89 ff be 04 00 00 00 e8 cc 11 f5 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:ffffc9000237dca0 EFLAGS: 00010297 RAX: 0000000000000000 RBX: 1ffff9200046fb94 RCX: 0000000000000001 RDX: 0000000000000001 RSI: 0000000000000004 RDI: ffffc9000237dcc0 RBP: ffffc9000237dd30 R08: dffffc0000000000 R09: 0000000000000003 R10: fffff5200046fb98 R11: dffffc0000000001 R12: dffffc0000000000 R13: 0000000000000000 R14: 1ffff9200046fb98 R15: ffffc9000237dcc0 FS: 00007f67aca826c0(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 00000001065f2000 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 d9 11 f5 fc call 0xfcf511e0 7: 4c 89 ff mov %r15,%rdi a: be 04 00 00 00 mov $0x4,%esi f: e8 cc 11 f5 fc call 0xfcf511e0 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