==================================================================
BUG: KASAN: null-ptr-deref in instrument_atomic_read include/linux/instrumented.h:71 [inline]
BUG: KASAN: null-ptr-deref in atomic64_read include/linux/atomic/atomic-instrumented.h:605 [inline]
BUG: KASAN: null-ptr-deref in flush_tlb_func+0x43/0x550 arch/x86/mm/tlb.c:736
Read of size 8 at addr 0000000000000329 by task syz.0.9604/502
CPU: 0 PID: 502 Comm: syz.0.9604 Not tainted 5.15.150-syzkaller-00330-g9044d25b8ff5 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106
__kasan_report mm/kasan/report.c:431 [inline]
kasan_report+0x16f/0x1c0 mm/kasan/report.c:444
kasan_check_range+0x293/0x2a0 mm/kasan/generic.c:189
__kasan_check_read+0x11/0x20 mm/kasan/shadow.c:31
instrument_atomic_read include/linux/instrumented.h:71 [inline]
atomic64_read include/linux/atomic/atomic-instrumented.h:605 [inline]
flush_tlb_func+0x43/0x550 arch/x86/mm/tlb.c:736
flush_smp_call_function_queue+0x222/0x6a0 kernel/smp.c:628
generic_smp_call_function_single_interrupt+0x13/0x20 kernel/smp.c:544
__sysvec_call_function_single+0x63/0x1b0 arch/x86/kernel/smp.c:248
sysvec_call_function_single+0x41/0xb0 arch/x86/kernel/smp.c:243
asm_sysvec_call_function_single+0x1b/0x20 arch/x86/include/asm/idtentry.h:646
RIP: 0010:arch_static_branch arch/x86/include/asm/jump_label.h:27 [inline]
RIP: 0010:slab_want_init_on_free mm/slab.h:652 [inline]
RIP: 0010:slab_free_freelist_hook+0xa5/0x190 mm/slub.c:1749
Code: 8b 75 c8 49 01 de 49 0f ce 4d 31 f7 48 3b 5d b8 4c 89 fb 0f 84 c5 00 00 00 45 8b 74 24 28 4d 8b bc 24 d8 00 00 00 4e 33 3c 33 <66> 90 45 31 ed 48 8b 55 08 41 0f b6 cd 4c 89 e7 48 89 de e8 33 36
RSP: 0018:ffffc90000007ba0 EFLAGS: 00000286
RAX: ffff88823fe8e000 RBX: ffff88810fbc6440 RCX: fffffffecfd38440
RDX: ffffc90000007c10 RSI: ffffc90000007c18 RDI: ffff8881001be780
RBP: ffffc90000007be8 R08: 0000000000000003 R09: 000000000000000c
R10: ffffc90000007830 R11: dffffc0000000001 R12: ffff8881001be780
R13: ffffffff81c16223 R14: 0000000000000068 R15: efbc126b2fbbcd4d
slab_free mm/slub.c:3519 [inline]
kmem_cache_free+0x116/0x2e0 mm/slub.c:3535
__d_free+0x23/0x30 fs/dcache.c:273
rcu_do_batch+0x57a/0xc10 kernel/rcu/tree.c:2523
rcu_core+0x517/0x1020 kernel/rcu/tree.c:2763
rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2776
__do_softirq+0x26d/0x5bf kernel/softirq.c:565
do_softirq+0xf6/0x150 kernel/softirq.c:452
__local_bh_enable_ip+0x75/0x80 kernel/softirq.c:379
__raw_spin_unlock_bh include/linux/spinlock_api_smp.h:176 [inline]
_raw_spin_unlock_bh+0x51/0x60 kernel/locking/spinlock.c:210
sock_hash_delete_elem+0x2a2/0x2f0 net/core/sock_map.c:945
bpf_prog_bc4ba9860fbb0da4+0x3e/0x93c
bpf_dispatcher_nop_func include/linux/bpf.h:785 [inline]
__bpf_prog_run include/linux/filter.h:618 [inline]
bpf_prog_run include/linux/filter.h:632 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:1880 [inline]
bpf_trace_run2+0x159/0x210 kernel/trace/bpf_trace.c:1917
__bpf_trace_tlb_flush+0x23/0x30 include/trace/events/tlb.h:38
trace_tlb_flush include/trace/events/tlb.h:38 [inline]
switch_mm_irqs_off+0x616/0x9b0 arch/x86/mm/tlb.c:629
context_switch kernel/sched/core.c:5137 [inline]
__schedule+0xb2b/0x1590 kernel/sched/core.c:6512
preempt_schedule_common+0x9b/0xf0 kernel/sched/core.c:6688
preempt_schedule+0xd9/0xe0 kernel/sched/core.c:6713
preempt_schedule_thunk+0x16/0x18 arch/x86/entry/thunk_64.S:34
__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:161 [inline]
_raw_spin_unlock_irqrestore+0x71/0x80 kernel/locking/spinlock.c:194
spin_unlock_irqrestore include/linux/spinlock.h:418 [inline]
__wake_up_common_lock kernel/sched/wait.c:141 [inline]
__wake_up_sync_key+0x1b1/0x3d0 kernel/sched/wait.c:209
__unix_dgram_recvmsg+0x5fc/0x1260 net/unix/af_unix.c:2341
unix_dgram_recvmsg+0xc4/0xe0 net/unix/af_unix.c:2412
____sys_recvmsg+0x286/0x530
___sys_recvmsg+0x1ec/0x690 net/socket.c:2692
do_recvmmsg+0x36b/0x8b0 net/socket.c:2786
__sys_recvmmsg net/socket.c:2865 [inline]
__do_sys_recvmmsg net/socket.c:2888 [inline]
__se_sys_recvmmsg net/socket.c:2881 [inline]
__x64_sys_recvmmsg+0x195/0x240 net/socket.c:2881
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+0x61/0xcb
RIP: 0033:0x7fb57cfdfbd9
Code: Unable to access opcode bytes at RIP 0x7fb57cfdfbaf.
RSP: 002b:00007fb57c240048 EFLAGS: 00000246 ORIG_RAX: 000000000000012b
RAX: ffffffffffffffda RBX: 00007fb57d16e038 RCX: 00007fb57cfdfbd9
RDX: 0000000000010106 RSI: 00000000200000c0 RDI: 0000000000000004
RBP: 00007fb57d04eaa1 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000002 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000006e R14: 00007fb57d16e038 R15: 00007ffe3133e208
==================================================================
general protection fault, probably for non-canonical address 0xdffffc0000000065: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000328-0x000000000000032f]
CPU: 0 PID: 502 Comm: syz.0.9604 Tainted: G B 5.15.150-syzkaller-00330-g9044d25b8ff5 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
RIP: 0010:arch_atomic64_read arch/x86/include/asm/atomic64_64.h:22 [inline]
RIP: 0010:atomic64_read include/linux/atomic/atomic-instrumented.h:606 [inline]
RIP: 0010:flush_tlb_func+0x4a/0x550 arch/x86/mm/tlb.c:736
Code: 8b 35 2a 96 cd 7e 65 66 44 8b 25 31 96 cd 7e 49 8d 9e 28 03 00 00 48 89 df be 08 00 00 00 e8 7d 98 7c 00 48 89 d8 48 c1 e8 03 <42> 80 3c 38 00 74 08 48 89 df e8 87 96 7c 00 4c 8b 3b 66 44 89 65
RSP: 0018:ffffc900000079d0 EFLAGS: 00010006
RAX: 0000000000000065 RBX: 0000000000000329 RCX: ffff88810cfc4f00
RDX: 0000000080010104 RSI: 0000000000000092 RDI: 00000000ffffffff
RBP: ffffc90000007a40 R08: ffffffff8141701b R09: 0000000000000003
R10: fffffbfff0e5284c R11: dffffc0000000001 R12: 1ffff1103ee00000
R13: ffff8881f7137180 R14: 0000000000000001 R15: dffffc0000000000
FS: 00007fb57c2406c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fb57c21efa8 CR3: 0000000120293000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
flush_smp_call_function_queue+0x222/0x6a0 kernel/smp.c:628
generic_smp_call_function_single_interrupt+0x13/0x20 kernel/smp.c:544
__sysvec_call_function_single+0x63/0x1b0 arch/x86/kernel/smp.c:248
sysvec_call_function_single+0x41/0xb0 arch/x86/kernel/smp.c:243
asm_sysvec_call_function_single+0x1b/0x20 arch/x86/include/asm/idtentry.h:646
RIP: 0010:arch_static_branch arch/x86/include/asm/jump_label.h:27 [inline]
RIP: 0010:slab_want_init_on_free mm/slab.h:652 [inline]
RIP: 0010:slab_free_freelist_hook+0xa5/0x190 mm/slub.c:1749
Code: 8b 75 c8 49 01 de 49 0f ce 4d 31 f7 48 3b 5d b8 4c 89 fb 0f 84 c5 00 00 00 45 8b 74 24 28 4d 8b bc 24 d8 00 00 00 4e 33 3c 33 <66> 90 45 31 ed 48 8b 55 08 41 0f b6 cd 4c 89 e7 48 89 de e8 33 36
RSP: 0018:ffffc90000007ba0 EFLAGS: 00000286
RAX: ffff88823fe8e000 RBX: ffff88810fbc6440 RCX: fffffffecfd38440
RDX: ffffc90000007c10 RSI: ffffc90000007c18 RDI: ffff8881001be780
RBP: ffffc90000007be8 R08: 0000000000000003 R09: 000000000000000c
R10: ffffc90000007830 R11: dffffc0000000001 R12: ffff8881001be780
R13: ffffffff81c16223 R14: 0000000000000068 R15: efbc126b2fbbcd4d
slab_free mm/slub.c:3519 [inline]
kmem_cache_free+0x116/0x2e0 mm/slub.c:3535
__d_free+0x23/0x30 fs/dcache.c:273
rcu_do_batch+0x57a/0xc10 kernel/rcu/tree.c:2523
rcu_core+0x517/0x1020 kernel/rcu/tree.c:2763
rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2776
__do_softirq+0x26d/0x5bf kernel/softirq.c:565
do_softirq+0xf6/0x150 kernel/softirq.c:452
__local_bh_enable_ip+0x75/0x80 kernel/softirq.c:379
__raw_spin_unlock_bh include/linux/spinlock_api_smp.h:176 [inline]
_raw_spin_unlock_bh+0x51/0x60 kernel/locking/spinlock.c:210
sock_hash_delete_elem+0x2a2/0x2f0 net/core/sock_map.c:945
bpf_prog_bc4ba9860fbb0da4+0x3e/0x93c
bpf_dispatcher_nop_func include/linux/bpf.h:785 [inline]
__bpf_prog_run include/linux/filter.h:618 [inline]
bpf_prog_run include/linux/filter.h:632 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:1880 [inline]
bpf_trace_run2+0x159/0x210 kernel/trace/bpf_trace.c:1917
__bpf_trace_tlb_flush+0x23/0x30 include/trace/events/tlb.h:38
trace_tlb_flush include/trace/events/tlb.h:38 [inline]
switch_mm_irqs_off+0x616/0x9b0 arch/x86/mm/tlb.c:629
context_switch kernel/sched/core.c:5137 [inline]
__schedule+0xb2b/0x1590 kernel/sched/core.c:6512
preempt_schedule_common+0x9b/0xf0 kernel/sched/core.c:6688
preempt_schedule+0xd9/0xe0 kernel/sched/core.c:6713
preempt_schedule_thunk+0x16/0x18 arch/x86/entry/thunk_64.S:34
__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:161 [inline]
_raw_spin_unlock_irqrestore+0x71/0x80 kernel/locking/spinlock.c:194
spin_unlock_irqrestore include/linux/spinlock.h:418 [inline]
__wake_up_common_lock kernel/sched/wait.c:141 [inline]
__wake_up_sync_key+0x1b1/0x3d0 kernel/sched/wait.c:209
__unix_dgram_recvmsg+0x5fc/0x1260 net/unix/af_unix.c:2341
unix_dgram_recvmsg+0xc4/0xe0 net/unix/af_unix.c:2412
____sys_recvmsg+0x286/0x530
___sys_recvmsg+0x1ec/0x690 net/socket.c:2692
do_recvmmsg+0x36b/0x8b0 net/socket.c:2786
__sys_recvmmsg net/socket.c:2865 [inline]
__do_sys_recvmmsg net/socket.c:2888 [inline]
__se_sys_recvmmsg net/socket.c:2881 [inline]
__x64_sys_recvmmsg+0x195/0x240 net/socket.c:2881
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+0x61/0xcb
RIP: 0033:0x7fb57cfdfbd9
Code: Unable to access opcode bytes at RIP 0x7fb57cfdfbaf.
RSP: 002b:00007fb57c240048 EFLAGS: 00000246 ORIG_RAX: 000000000000012b
RAX: ffffffffffffffda RBX: 00007fb57d16e038 RCX: 00007fb57cfdfbd9
RDX: 0000000000010106 RSI: 00000000200000c0 RDI: 0000000000000004
RBP: 00007fb57d04eaa1 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000002 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000006e R14: 00007fb57d16e038 R15: 00007ffe3133e208
Modules linked in:
---[ end trace 56d376257f7594f7 ]---
RIP: 0010:arch_atomic64_read arch/x86/include/asm/atomic64_64.h:22 [inline]
RIP: 0010:atomic64_read include/linux/atomic/atomic-instrumented.h:606 [inline]
RIP: 0010:flush_tlb_func+0x4a/0x550 arch/x86/mm/tlb.c:736
Code: 8b 35 2a 96 cd 7e 65 66 44 8b 25 31 96 cd 7e 49 8d 9e 28 03 00 00 48 89 df be 08 00 00 00 e8 7d 98 7c 00 48 89 d8 48 c1 e8 03 <42> 80 3c 38 00 74 08 48 89 df e8 87 96 7c 00 4c 8b 3b 66 44 89 65
RSP: 0018:ffffc900000079d0 EFLAGS: 00010006
RAX: 0000000000000065 RBX: 0000000000000329 RCX: ffff88810cfc4f00
RDX: 0000000080010104 RSI: 0000000000000092 RDI: 00000000ffffffff
RBP: ffffc90000007a40 R08: ffffffff8141701b R09: 0000000000000003
R10: fffffbfff0e5284c R11: dffffc0000000001 R12: 1ffff1103ee00000
R13: ffff8881f7137180 R14: 0000000000000001 R15: dffffc0000000000
FS: 00007fb57c2406c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fb57c21efa8 CR3: 0000000120293000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: 8b 75 c8 mov -0x38(%rbp),%esi
3: 49 01 de add %rbx,%r14
6: 49 0f ce bswap %r14
9: 4d 31 f7 xor %r14,%r15
c: 48 3b 5d b8 cmp -0x48(%rbp),%rbx
10: 4c 89 fb mov %r15,%rbx
13: 0f 84 c5 00 00 00 je 0xde
19: 45 8b 74 24 28 mov 0x28(%r12),%r14d
1e: 4d 8b bc 24 d8 00 00 mov 0xd8(%r12),%r15
25: 00
26: 4e 33 3c 33 xor (%rbx,%r14,1),%r15
* 2a: 66 90 xchg %ax,%ax <-- trapping instruction
2c: 45 31 ed xor %r13d,%r13d
2f: 48 8b 55 08 mov 0x8(%rbp),%rdx
33: 41 0f b6 cd movzbl %r13b,%ecx
37: 4c 89 e7 mov %r12,%rdi
3a: 48 89 de mov %rbx,%rsi
3d: e8 .byte 0xe8
3e: 33 36 xor (%rsi),%esi