general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] CPU: 0 PID: 13476 Comm: syz-executor.6 Not tainted 6.5.0-rc7-next-20230825 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 RIP: 0010:strchr+0x1b/0xb0 Code: 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 48 b8 00 00 00 00 00 fc ff df 55 48 89 fa 53 48 c1 ea 03 48 83 ec 10 <0f> b6 04 02 48 89 fa 83 e2 07 38 d0 7f 04 84 c0 75 59 0f b6 07 89 RSP: 0018:ffff88804251fa50 EFLAGS: 00010286 RAX: dffffc0000000000 RBX: ffff8880425105c0 RCX: ffffc9000804f000 RDX: 0000000000000000 RSI: 0000000000000025 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000001 R12: ffff88804251fae0 R13: 0000000000000cc0 R14: ffff88800995b480 R15: 0000000000000001 FS: 00007f5df0f97700(0000) GS:ffff88806ce00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f2b68d00f40 CR3: 00000000433d2000 CR4: 0000000000350ef0 Call Trace: kvasprintf_const+0x25/0x1a0 kobject_set_name_vargs+0x5a/0x150 kobject_add+0x111/0x240 device_add+0x334/0x1830 netdev_register_kobject+0x17e/0x3b0 register_netdevice+0xbd7/0x13a0 __tun_chr_ioctl+0x21aa/0x4220 __x64_sys_ioctl+0x1a4/0x210 do_syscall_64+0x3f/0x90 entry_SYSCALL_64_after_hwframe+0x6e/0xd8 RIP: 0033:0x7f5df3a21b19 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f5df0f97188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f5df3b34f60 RCX: 00007f5df3a21b19 RDX: 0000000020000000 RSI: 00000000400454ca RDI: 0000000000000005 RBP: 00007f5df0f971d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002 R13: 00007ffd0865511f R14: 00007f5df0f97300 R15: 0000000000022000 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:strchr+0x1b/0xb0 Code: 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 48 b8 00 00 00 00 00 fc ff df 55 48 89 fa 53 48 c1 ea 03 48 83 ec 10 <0f> b6 04 02 48 89 fa 83 e2 07 38 d0 7f 04 84 c0 75 59 0f b6 07 89 RSP: 0018:ffff88804251fa50 EFLAGS: 00010286 RAX: dffffc0000000000 RBX: ffff8880425105c0 RCX: ffffc9000804f000 RDX: 0000000000000000 RSI: 0000000000000025 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000001 R12: ffff88804251fae0 R13: 0000000000000cc0 R14: ffff88800995b480 R15: 0000000000000001 FS: 00007f5df0f97700(0000) GS:ffff88806ce00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f2b68d00f40 CR3: 00000000433d2000 CR4: 0000000000350ef0 ================================================================== BUG: KASAN: slab-use-after-free in __mutex_lock+0x19db/0x1a30 Read of size 4 at addr ffff8880401236b4 by task kworker/1:0/13217 CPU: 1 PID: 13217 Comm: kworker/1:0 Tainted: G D 6.5.0-rc7-next-20230825 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 Workqueue: ipv6_addrconf addrconf_verify_work Call Trace: dump_stack_lvl+0x91/0xf0 print_report+0xcc/0x620 kasan_report+0xbe/0xf0 __mutex_lock+0x19db/0x1a30 addrconf_verify_work+0x12/0x30 process_one_work+0x7c8/0x1450 worker_thread+0x80e/0x1190 kthread+0x33f/0x440 ret_from_fork+0x48/0x80 ret_from_fork_asm+0x1b/0x30 Allocated by task 13475: kasan_save_stack+0x22/0x50 kasan_set_track+0x25/0x30 __kasan_slab_alloc+0x59/0x70 kmem_cache_alloc_node+0x199/0x3b0 copy_process+0x3c2/0x7320 kernel_clone+0xeb/0x810 __do_sys_clone+0xba/0x100 do_syscall_64+0x3f/0x90 entry_SYSCALL_64_after_hwframe+0x6e/0xd8 Freed by task 13475: kasan_save_stack+0x22/0x50 kasan_set_track+0x25/0x30 kasan_save_free_info+0x2b/0x50 __kasan_slab_free+0x10a/0x190 kmem_cache_free+0x10d/0x4d0 _free_event+0xadc/0x1190 perf_event_release_kernel+0x5b8/0x7a0 perf_release+0x37/0x50 __fput+0x400/0xa70 __fput_sync+0x45/0x50 __x64_sys_close+0x8c/0x120 do_syscall_64+0x3f/0x90 entry_SYSCALL_64_after_hwframe+0x6e/0xd8 Last potentially related work creation: kasan_save_stack+0x22/0x50 __kasan_record_aux_stack+0x8e/0xa0 __call_rcu_common.constprop.0+0x6a/0xbd0 put_task_struct_rcu_user+0x87/0xd0 __schedule+0x9b1/0x2b00 __cond_resched+0x46/0x70 dput+0x54/0xe60 path_openat+0x17dd/0x2710 do_filp_open+0x1ba/0x410 do_sys_openat2+0x164/0x1d0 __x64_sys_openat+0x143/0x200 do_syscall_64+0x3f/0x90 entry_SYSCALL_64_after_hwframe+0x6e/0xd8 Second to last potentially related work creation: kasan_save_stack+0x22/0x50 __kasan_record_aux_stack+0x8e/0xa0 task_work_add+0x7e/0x2d0 scheduler_tick+0x176/0x3d0 update_process_times+0x10e/0x150 tick_sched_handle+0x8e/0x170 tick_sched_timer+0xe6/0x110 __hrtimer_run_queues+0x17f/0xb60 hrtimer_interrupt+0x2ef/0x750 __sysvec_apic_timer_interrupt+0xb3/0x330 sysvec_apic_timer_interrupt+0x69/0x90 asm_sysvec_apic_timer_interrupt+0x1a/0x20 The buggy address belongs to the object at ffff888040123680 which belongs to the cache task_struct of size 6720 The buggy address is located 52 bytes inside of freed 6720-byte region [ffff888040123680, ffff8880401250c0) The buggy address belongs to the physical page: page:000000006dece69e refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x40120 head:000000006dece69e order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff88800bfe3201 flags: 0x100000000000840(slab|head|node=0|zone=1) page_type: 0xffffffff() raw: 0100000000000840 ffff8880087af640 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000040004 00000001ffffffff ffff88800bfe3201 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888040123580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888040123600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888040123680: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888040123700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888040123780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess): 0: 90 nop 1: 90 nop 2: 90 nop 3: 90 nop 4: 90 nop 5: 90 nop 6: 90 nop 7: 90 nop 8: 90 nop 9: 90 nop a: 90 nop b: 90 nop c: 90 nop d: 90 nop e: 90 nop f: f3 0f 1e fa endbr64 13: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 1a: fc ff df 1d: 55 push %rbp 1e: 48 89 fa mov %rdi,%rdx 21: 53 push %rbx 22: 48 c1 ea 03 shr $0x3,%rdx 26: 48 83 ec 10 sub $0x10,%rsp * 2a: 0f b6 04 02 movzbl (%rdx,%rax,1),%eax <-- trapping instruction 2e: 48 89 fa mov %rdi,%rdx 31: 83 e2 07 and $0x7,%edx 34: 38 d0 cmp %dl,%al 36: 7f 04 jg 0x3c 38: 84 c0 test %al,%al 3a: 75 59 jne 0x95 3c: 0f b6 07 movzbl (%rdi),%eax 3f: 89 .byte 0x89