================================================================== 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-executor/293 CPU: 1 PID: 293 Comm: syz-executor Not tainted 5.15.151-syzkaller-00415-gdb06c48ab67e #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:rcu_dynticks_curr_cpu_in_eqs kernel/rcu/tree.c:331 [inline] RIP: 0010:rcu_is_watching+0x3a/0xb0 kernel/rcu/tree.c:1123 Code: e8 fb 02 67 03 89 c3 83 f8 08 73 73 49 bf 00 00 00 00 00 fc ff df 4c 8d 34 dd 10 d8 02 86 4c 89 f0 48 c1 e8 03 42 80 3c 38 00 <74> 08 4c 89 f7 e8 fc 46 56 00 48 c7 c3 70 8c 03 00 49 03 1e 48 89 RSP: 0018:ffffc900001d0708 EFLAGS: 00000246 RAX: 1ffffffff0c05b03 RBX: 0000000000000001 RCX: dffffc0000000000 RDX: 1ffff9200003a0f2 RSI: ffffffff85830dc0 RDI: ffffffff85830d80 RBP: ffffc900001d0720 R08: ffffc900001d0868 R09: 000000000000000e R10: ffffc900001d0870 R11: dffffc0000000001 R12: ffff88811c898000 R13: ffffffff815f52e0 R14: ffffffff8602d818 R15: dffffc0000000000 kernel_text_address kernel/extable.c:139 [inline] __kernel_text_address+0x75/0x110 kernel/extable.c:105 unwind_get_return_address+0x4d/0x90 arch/x86/kernel/unwind_frame.c:19 arch_stack_walk+0xf3/0x140 arch/x86/kernel/stacktrace.c:26 stack_trace_save+0x113/0x1c0 kernel/stacktrace.c:122 kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:45 kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370 ____kasan_slab_free+0x126/0x160 mm/kasan/common.c:365 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:373 kasan_slab_free include/linux/kasan.h:193 [inline] slab_free_hook mm/slub.c:1723 [inline] slab_free_freelist_hook+0xbd/0x190 mm/slub.c:1749 slab_free mm/slub.c:3519 [inline] kmem_cache_free+0x116/0x2e0 mm/slub.c:3535 inode_free_by_rcu+0x1c/0x20 security/security.c:1048 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_586ab708469db861+0x41/0xe8 bpf_dispatcher_nop_func include/linux/bpf.h:785 [inline] __bpf_prog_run include/linux/filter.h:625 [inline] bpf_prog_run include/linux/filter.h:632 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:1880 [inline] bpf_trace_run2+0xec/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] unlock_page_lruvec_irqrestore include/linux/memcontrol.h:1591 [inline] relock_page_lruvec_irqsave include/linux/memcontrol.h:1623 [inline] release_pages+0x5e7/0x1370 mm/swap.c:992 __pagevec_release+0x84/0x100 mm/swap.c:1029 pagevec_release include/linux/pagevec.h:81 [inline] truncate_inode_pages_range+0x482/0x1160 mm/truncate.c:329 truncate_inode_pages+0x24/0x30 mm/truncate.c:425 kill_bdev block/bdev.c:77 [inline] blkdev_flush_mapping+0x182/0x340 block/bdev.c:659 blkdev_put_whole block/bdev.c:690 [inline] blkdev_put+0x509/0x7b0 block/bdev.c:954 kill_block_super+0xb3/0xe0 fs/super.c:1417 deactivate_locked_super+0xad/0x110 fs/super.c:335 deactivate_super+0xbe/0xf0 fs/super.c:366 cleanup_mnt+0x45c/0x510 fs/namespace.c:1143 __cleanup_mnt+0x19/0x20 fs/namespace.c:1150 task_work_run+0x129/0x190 kernel/task_work.c:164 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop+0xc4/0xe0 kernel/entry/common.c:175 exit_to_user_mode_prepare+0x5a/0xa0 kernel/entry/common.c:208 __syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline] syscall_exit_to_user_mode+0x26/0x160 kernel/entry/common.c:301 do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7fb18d072f07 Code: Unable to access opcode bytes at RIP 0x7fb18d072edd. RSP: 002b:00007ffdbb196f78 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 00007fb18d0df515 RCX: 00007fb18d072f07 RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffdbb197030 RBP: 00007ffdbb197030 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffffff R11: 0000000000000246 R12: 00007ffdbb1980f0 R13: 00007fb18d0df515 R14: 000000000002bc3d R15: 000000000002b93d ================================================================== general protection fault, probably for non-canonical address 0xdffffc0000000065: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000328-0x000000000000032f] CPU: 1 PID: 293 Comm: syz-executor Tainted: G B 5.15.151-syzkaller-00415-gdb06c48ab67e #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 0a 96 cd 7e 65 66 44 8b 25 11 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:ffffc900001d0530 EFLAGS: 00010006 RAX: 0000000000000065 RBX: 0000000000000329 RCX: ffff88811c898000 RDX: 0000000080010105 RSI: 0000000000000092 RDI: 00000000ffffffff RBP: ffffc900001d05a0 R08: ffffffff8141703b R09: 0000000000000003 R10: fffffbfff0e5284c R11: dffffc0000000001 R12: 1ffff1103ee20000 R13: ffff8881f7037180 R14: 0000000000000001 R15: dffffc0000000000 FS: 00005555561f4500(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055555620f4a8 CR3: 0000000122fe5000 CR4: 00000000003506a0 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:rcu_dynticks_curr_cpu_in_eqs kernel/rcu/tree.c:331 [inline] RIP: 0010:rcu_is_watching+0x3a/0xb0 kernel/rcu/tree.c:1123 Code: e8 fb 02 67 03 89 c3 83 f8 08 73 73 49 bf 00 00 00 00 00 fc ff df 4c 8d 34 dd 10 d8 02 86 4c 89 f0 48 c1 e8 03 42 80 3c 38 00 <74> 08 4c 89 f7 e8 fc 46 56 00 48 c7 c3 70 8c 03 00 49 03 1e 48 89 RSP: 0018:ffffc900001d0708 EFLAGS: 00000246 RAX: 1ffffffff0c05b03 RBX: 0000000000000001 RCX: dffffc0000000000 RDX: 1ffff9200003a0f2 RSI: ffffffff85830dc0 RDI: ffffffff85830d80 RBP: ffffc900001d0720 R08: ffffc900001d0868 R09: 000000000000000e R10: ffffc900001d0870 R11: dffffc0000000001 R12: ffff88811c898000 R13: ffffffff815f52e0 R14: ffffffff8602d818 R15: dffffc0000000000 kernel_text_address kernel/extable.c:139 [inline] __kernel_text_address+0x75/0x110 kernel/extable.c:105 unwind_get_return_address+0x4d/0x90 arch/x86/kernel/unwind_frame.c:19 arch_stack_walk+0xf3/0x140 arch/x86/kernel/stacktrace.c:26 stack_trace_save+0x113/0x1c0 kernel/stacktrace.c:122 kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:45 kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370 ____kasan_slab_free+0x126/0x160 mm/kasan/common.c:365 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:373 kasan_slab_free include/linux/kasan.h:193 [inline] slab_free_hook mm/slub.c:1723 [inline] slab_free_freelist_hook+0xbd/0x190 mm/slub.c:1749 slab_free mm/slub.c:3519 [inline] kmem_cache_free+0x116/0x2e0 mm/slub.c:3535 inode_free_by_rcu+0x1c/0x20 security/security.c:1048 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_586ab708469db861+0x41/0xe8 bpf_dispatcher_nop_func include/linux/bpf.h:785 [inline] __bpf_prog_run include/linux/filter.h:625 [inline] bpf_prog_run include/linux/filter.h:632 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:1880 [inline] bpf_trace_run2+0xec/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] unlock_page_lruvec_irqrestore include/linux/memcontrol.h:1591 [inline] relock_page_lruvec_irqsave include/linux/memcontrol.h:1623 [inline] release_pages+0x5e7/0x1370 mm/swap.c:992 __pagevec_release+0x84/0x100 mm/swap.c:1029 pagevec_release include/linux/pagevec.h:81 [inline] truncate_inode_pages_range+0x482/0x1160 mm/truncate.c:329 truncate_inode_pages+0x24/0x30 mm/truncate.c:425 kill_bdev block/bdev.c:77 [inline] blkdev_flush_mapping+0x182/0x340 block/bdev.c:659 blkdev_put_whole block/bdev.c:690 [inline] blkdev_put+0x509/0x7b0 block/bdev.c:954 kill_block_super+0xb3/0xe0 fs/super.c:1417 deactivate_locked_super+0xad/0x110 fs/super.c:335 deactivate_super+0xbe/0xf0 fs/super.c:366 cleanup_mnt+0x45c/0x510 fs/namespace.c:1143 __cleanup_mnt+0x19/0x20 fs/namespace.c:1150 task_work_run+0x129/0x190 kernel/task_work.c:164 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop+0xc4/0xe0 kernel/entry/common.c:175 exit_to_user_mode_prepare+0x5a/0xa0 kernel/entry/common.c:208 __syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline] syscall_exit_to_user_mode+0x26/0x160 kernel/entry/common.c:301 do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7fb18d072f07 Code: Unable to access opcode bytes at RIP 0x7fb18d072edd. RSP: 002b:00007ffdbb196f78 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 00007fb18d0df515 RCX: 00007fb18d072f07 RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffdbb197030 RBP: 00007ffdbb197030 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffffff R11: 0000000000000246 R12: 00007ffdbb1980f0 R13: 00007fb18d0df515 R14: 000000000002bc3d R15: 000000000002b93d Modules linked in: ---[ end trace 86ea5d6c3e147dbb ]--- 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 0a 96 cd 7e 65 66 44 8b 25 11 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:ffffc900001d0530 EFLAGS: 00010006 RAX: 0000000000000065 RBX: 0000000000000329 RCX: ffff88811c898000 RDX: 0000000080010105 RSI: 0000000000000092 RDI: 00000000ffffffff RBP: ffffc900001d05a0 R08: ffffffff8141703b R09: 0000000000000003 R10: fffffbfff0e5284c R11: dffffc0000000001 R12: 1ffff1103ee20000 R13: ffff8881f7037180 R14: 0000000000000001 R15: dffffc0000000000 FS: 00005555561f4500(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055555620f4a8 CR3: 0000000122fe5000 CR4: 00000000003506a0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess): 0: e8 fb 02 67 03 call 0x3670300 5: 89 c3 mov %eax,%ebx 7: 83 f8 08 cmp $0x8,%eax a: 73 73 jae 0x7f c: 49 bf 00 00 00 00 00 movabs $0xdffffc0000000000,%r15 13: fc ff df 16: 4c 8d 34 dd 10 d8 02 lea -0x79fd27f0(,%rbx,8),%r14 1d: 86 1e: 4c 89 f0 mov %r14,%rax 21: 48 c1 e8 03 shr $0x3,%rax 25: 42 80 3c 38 00 cmpb $0x0,(%rax,%r15,1) * 2a: 74 08 je 0x34 <-- trapping instruction 2c: 4c 89 f7 mov %r14,%rdi 2f: e8 fc 46 56 00 call 0x564730 34: 48 c7 c3 70 8c 03 00 mov $0x38c70,%rbx 3b: 49 03 1e add (%r14),%rbx 3e: 48 rex.W 3f: 89 .byte 0x89