==================================================================
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+0x97/0x170 kernel/locking/spinlock.c:300
Write of size 4 at addr 0000000000000030 by task syz-executor997/1845
CPU: 1 PID: 1845 Comm: syz-executor997 Not tainted 6.1.25-syzkaller-00258-gcffbdd825e02 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106
print_report+0xe1/0x4e0 mm/kasan/report.c:398
kasan_report+0x13c/0x170 mm/kasan/report.c:495
kasan_check_range+0x294/0x2a0 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+0x97/0x170 kernel/locking/spinlock.c:300
__drop_extent_tree+0x3db/0x680 fs/f2fs/extent_cache.c:1100
f2fs_drop_extent_tree+0x17/0x30 fs/f2fs/extent_cache.c:1116
f2fs_insert_range+0x455/0x560 fs/f2fs/file.c:1664
f2fs_fallocate+0x502/0x770 fs/f2fs/file.c:1838
vfs_fallocate+0x492/0x570 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
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7faf27fddbb9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 61 18 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007faf27f81208 EFLAGS: 00000246 ORIG_RAX: 000000000000011d
RAX: ffffffffffffffda RBX: 00007faf28060788 RCX: 00007faf27fddbb9
RDX: 0000000000000000 RSI: 0000000000000020 RDI: 0000000000000005
RBP: 00007faf28060780 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000010000 R11: 0000000000000246 R12: 00007faf2806078c
R13: 00007ffd07795a3f R14: 00007faf27f81300 R15: 0000000000022000
==================================================================
BUG: kernel NULL pointer dereference, address: 0000000000000030
#PF: supervisor write access in kernel mode
#PF: error_code(0x0002) - not-present page
PGD 109bf9067 P4D 109bf9067 PUD 122011067 PMD 0
Oops: 0002 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 1845 Comm: syz-executor997 Tainted: G B 6.1.25-syzkaller-00258-gcffbdd825e02 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
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+0xb6/0x170 kernel/locking/spinlock.c:300
Code: ef be 04 00 00 00 e8 79 b9 ae fc 4c 89 ff be 04 00 00 00 e8 6c b9 ae fc 43 0f b6 04 26 84 c0 75 7d 8b 44 24 20 b9 ff 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:ffffc90004307be0 EFLAGS: 00010297
RAX: 0000000000000000 RBX: 1ffff92000860f7c RCX: 00000000000000ff
RDX: 0000000000000001 RSI: 0000000000000004 RDI: ffffc90004307c00
RBP: ffffc90004307c78 R08: dffffc0000000000 R09: 0000000000000003
R10: ffffffffffffffff R11: dffffc0000000001 R12: dffffc0000000000
R13: 0000000000000030 R14: 1ffff92000860f80 R15: ffffc90004307c00
FS: 00007faf27f81700(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000030 CR3: 000000011aa03000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
__drop_extent_tree+0x3db/0x680 fs/f2fs/extent_cache.c:1100
f2fs_drop_extent_tree+0x17/0x30 fs/f2fs/extent_cache.c:1116
f2fs_insert_range+0x455/0x560 fs/f2fs/file.c:1664
f2fs_fallocate+0x502/0x770 fs/f2fs/file.c:1838
vfs_fallocate+0x492/0x570 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
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7faf27fddbb9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 61 18 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007faf27f81208 EFLAGS: 00000246 ORIG_RAX: 000000000000011d
RAX: ffffffffffffffda RBX: 00007faf28060788 RCX: 00007faf27fddbb9
RDX: 0000000000000000 RSI: 0000000000000020 RDI: 0000000000000005
RBP: 00007faf28060780 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000010000 R11: 0000000000000246 R12: 00007faf2806078c
R13: 00007ffd07795a3f R14: 00007faf27f81300 R15: 0000000000022000
Modules linked in:
CR2: 0000000000000030
---[ end trace 0000000000000000 ]---
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+0xb6/0x170 kernel/locking/spinlock.c:300
Code: ef be 04 00 00 00 e8 79 b9 ae fc 4c 89 ff be 04 00 00 00 e8 6c b9 ae fc 43 0f b6 04 26 84 c0 75 7d 8b 44 24 20 b9 ff 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:ffffc90004307be0 EFLAGS: 00010297
RAX: 0000000000000000 RBX: 1ffff92000860f7c RCX: 00000000000000ff
RDX: 0000000000000001 RSI: 0000000000000004 RDI: ffffc90004307c00
RBP: ffffc90004307c78 R08: dffffc0000000000 R09: 0000000000000003
R10: ffffffffffffffff R11: dffffc0000000001 R12: dffffc0000000000
R13: 0000000000000030 R14: 1ffff92000860f80 R15: ffffc90004307c00
FS: 00007faf27f81700(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000030 CR3: 000000011aa03000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: ef out %eax,(%dx)
1: be 04 00 00 00 mov $0x4,%esi
6: e8 79 b9 ae fc callq 0xfcaeb984
b: 4c 89 ff mov %r15,%rdi
e: be 04 00 00 00 mov $0x4,%esi
13: e8 6c b9 ae fc callq 0xfcaeb984
18: 43 0f b6 04 26 movzbl (%r14,%r12,1),%eax
1d: 84 c0 test %al,%al
1f: 75 7d jne 0x9e
21: 8b 44 24 20 mov 0x20(%rsp),%eax
25: b9 ff 00 00 00 mov $0xff,%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