================================================================== BUG: KASAN: null-ptr-deref in instrument_atomic_read_write include/linux/instrumented.h:102 [inline] BUG: KASAN: null-ptr-deref in atomic_try_cmpxchg_acquire include/linux/atomic/atomic-instrumented.h:541 [inline] BUG: KASAN: null-ptr-deref in queued_write_lock include/asm-generic/qrwlock.h:98 [inline] BUG: KASAN: null-ptr-deref in __raw_write_lock include/linux/rwlock_api_smp.h:210 [inline] BUG: KASAN: null-ptr-deref in _raw_write_lock+0x81/0xe0 kernel/locking/spinlock.c:300 Write of size 4 at addr 0000000000000030 by task syz-executor.2/372 CPU: 0 PID: 372 Comm: syz-executor.2 Not tainted 6.1.141-syzkaller-1169943-g7011769d221c #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: __dump_stack+0x21/0x24 lib/dump_stack.c:88 dump_stack_lvl+0xee/0x150 lib/dump_stack.c:106 print_report+0x3d/0x60 mm/kasan/report.c:430 kasan_report+0x122/0x150 mm/kasan/report.c:531 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x280/0x290 mm/kasan/generic.c:189 __kasan_check_write+0x14/0x20 mm/kasan/shadow.c:37 instrument_atomic_read_write include/linux/instrumented.h:102 [inline] atomic_try_cmpxchg_acquire include/linux/atomic/atomic-instrumented.h:541 [inline] queued_write_lock include/asm-generic/qrwlock.h:98 [inline] __raw_write_lock include/linux/rwlock_api_smp.h:210 [inline] _raw_write_lock+0x81/0xe0 kernel/locking/spinlock.c:300 __drop_extent_tree+0x44b/0x6e0 fs/f2fs/extent_cache.c:1089 f2fs_drop_extent_tree+0x17/0x30 fs/f2fs/extent_cache.c:1105 f2fs_insert_range+0x458/0x560 fs/f2fs/file.c:1752 f2fs_fallocate+0x498/0x720 fs/f2fs/file.c:1946 vfs_fallocate+0x4c5/0x5a0 fs/open.c:324 ksys_fallocate fs/open.c:347 [inline] __do_sys_fallocate fs/open.c:355 [inline] __se_sys_fallocate fs/open.c:353 [inline] __x64_sys_fallocate+0xc0/0x110 fs/open.c:353 x64_sys_call+0x7fa/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:286 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f95d627c959 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f95d6f2d0c8 EFLAGS: 00000246 ORIG_RAX: 000000000000011d RAX: ffffffffffffffda RBX: 00007f95d639bf80 RCX: 00007f95d627c959 RDX: 0000000000000000 RSI: 0000000000000020 RDI: 0000000000000005 RBP: 00007f95d62d8c88 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000010000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f95d639bf80 R15: 00007ffe554d6328 ================================================================== BUG: kernel NULL pointer dereference, address: 0000000000000030 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page PGD 124a70067 P4D 124a70067 PUD 124a7a067 PMD 0 Oops: 0002 [#1] PREEMPT SMP KASAN CPU: 0 PID: 372 Comm: syz-executor.2 Tainted: G B 6.1.141-syzkaller-1169943-g7011769d221c #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 RIP: 0010:arch_atomic_try_cmpxchg arch/x86/include/asm/atomic.h:202 [inline] RIP: 0010:atomic_try_cmpxchg_acquire include/linux/atomic/atomic-instrumented.h:543 [inline] RIP: 0010:queued_write_lock include/asm-generic/qrwlock.h:98 [inline] RIP: 0010:__raw_write_lock include/linux/rwlock_api_smp.h:210 [inline] RIP: 0010:_raw_write_lock+0x97/0xe0 kernel/locking/spinlock.c:300 Code: 44 24 20 00 00 00 00 48 89 df be 04 00 00 00 e8 7f 07 c4 fc 4c 89 f7 be 04 00 00 00 e8 72 07 c4 fc 8b 44 24 20 b9 ff 00 00 00 0f b1 0b 75 2d 48 c7 04 24 0e 36 e0 45 4b c7 04 27 00 00 00 00 RSP: 0018:ffffc90001597be0 EFLAGS: 00010297 RAX: 0000000000000000 RBX: 0000000000000030 RCX: 00000000000000ff RDX: 0000000000000001 RSI: 0000000000000004 RDI: ffffc90001597c00 RBP: ffffc90001597c60 R08: 0000000000000004 R09: 0000000000000003 R10: fffff520002b2f80 R11: 1ffff920002b2f80 R12: dffffc0000000000 R13: 1ffff110244b1dd3 R14: ffffc90001597c00 R15: 1ffff920002b2f7c FS: 00007f95d6f2d6c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000030 CR3: 0000000124a0c000 CR4: 00000000003506b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __drop_extent_tree+0x44b/0x6e0 fs/f2fs/extent_cache.c:1089 f2fs_drop_extent_tree+0x17/0x30 fs/f2fs/extent_cache.c:1105 f2fs_insert_range+0x458/0x560 fs/f2fs/file.c:1752 f2fs_fallocate+0x498/0x720 fs/f2fs/file.c:1946 vfs_fallocate+0x4c5/0x5a0 fs/open.c:324 ksys_fallocate fs/open.c:347 [inline] __do_sys_fallocate fs/open.c:355 [inline] __se_sys_fallocate fs/open.c:353 [inline] __x64_sys_fallocate+0xc0/0x110 fs/open.c:353 x64_sys_call+0x7fa/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:286 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f95d627c959 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f95d6f2d0c8 EFLAGS: 00000246 ORIG_RAX: 000000000000011d RAX: ffffffffffffffda RBX: 00007f95d639bf80 RCX: 00007f95d627c959 RDX: 0000000000000000 RSI: 0000000000000020 RDI: 0000000000000005 RBP: 00007f95d62d8c88 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000010000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f95d639bf80 R15: 00007ffe554d6328 Modules linked in: CR2: 0000000000000030 ---[ end trace 0000000000000000 ]--- RIP: 0010:arch_atomic_try_cmpxchg arch/x86/include/asm/atomic.h:202 [inline] RIP: 0010:atomic_try_cmpxchg_acquire include/linux/atomic/atomic-instrumented.h:543 [inline] RIP: 0010:queued_write_lock include/asm-generic/qrwlock.h:98 [inline] RIP: 0010:__raw_write_lock include/linux/rwlock_api_smp.h:210 [inline] RIP: 0010:_raw_write_lock+0x97/0xe0 kernel/locking/spinlock.c:300 Code: 44 24 20 00 00 00 00 48 89 df be 04 00 00 00 e8 7f 07 c4 fc 4c 89 f7 be 04 00 00 00 e8 72 07 c4 fc 8b 44 24 20 b9 ff 00 00 00 0f b1 0b 75 2d 48 c7 04 24 0e 36 e0 45 4b c7 04 27 00 00 00 00 RSP: 0018:ffffc90001597be0 EFLAGS: 00010297 RAX: 0000000000000000 RBX: 0000000000000030 RCX: 00000000000000ff RDX: 0000000000000001 RSI: 0000000000000004 RDI: ffffc90001597c00 RBP: ffffc90001597c60 R08: 0000000000000004 R09: 0000000000000003 R10: fffff520002b2f80 R11: 1ffff920002b2f80 R12: dffffc0000000000 R13: 1ffff110244b1dd3 R14: ffffc90001597c00 R15: 1ffff920002b2f7c FS: 00007f95d6f2d6c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000030 CR3: 0000000124a0c000 CR4: 00000000003506b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess): 0: 44 24 20 rex.R and $0x20,%al 3: 00 00 add %al,(%rax) 5: 00 00 add %al,(%rax) 7: 48 89 df mov %rbx,%rdi a: be 04 00 00 00 mov $0x4,%esi f: e8 7f 07 c4 fc call 0xfcc40793 14: 4c 89 f7 mov %r14,%rdi 17: be 04 00 00 00 mov $0x4,%esi 1c: e8 72 07 c4 fc call 0xfcc40793 21: 8b 44 24 20 mov 0x20(%rsp),%eax 25: b9 ff 00 00 00 mov $0xff,%ecx * 2a: f0 0f b1 0b lock cmpxchg %ecx,(%rbx) <-- trapping instruction 2e: 75 2d jne 0x5d 30: 48 c7 04 24 0e 36 e0 movq $0x45e0360e,(%rsp) 37: 45 38: 4b c7 04 27 00 00 00 movq $0x0,(%r15,%r12,1) 3f: 00