BUG: kernel NULL pointer dereference, address: 0000000000000000 #PF: supervisor instruction fetch in kernel mode #PF: error_code(0x0010) - not-present page PGD 1d8e29067 P4D 1d8e29067 PUD 1ecfc2067 PMD 0 Oops: 0010 [#1] PREEMPT SMP KASAN CPU: 1 PID: 562 Comm: syz-executor.0 Not tainted 5.4.274-syzkaller-00016-gdd432c37afcd #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 RIP: 0010:0x0 Code: Bad RIP value. RSP: 0018:ffff8881f6f09d18 EFLAGS: 00010202 RAX: ffffffff8154d7aa RBX: 0000000000000101 RCX: ffff8881ebb1ee40 RDX: 0000000000000101 RSI: 0000000000000000 RDI: ffff8881d43fb1c0 RBP: ffff8881f6f09ec8 R08: ffffffff8154d3ee R09: 0000000000000003 R10: ffffffffffffffff R11: dffffc0000000001 R12: 00000000ffff9c08 R13: dffffc0000000000 R14: 0000000000000000 R15: ffff8881d43fb1c0 FS: 00007f3504f6b6c0(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffffffffd6 CR3: 00000001ecfc3000 CR4: 00000000003406a0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: call_timer_fn+0x36/0x390 kernel/time/timer.c:1448 expire_timers kernel/time/timer.c:1493 [inline] __run_timers+0x879/0xbe0 kernel/time/timer.c:1817 run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1830 __do_softirq+0x23b/0x6b7 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x195/0x1c0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:538 [inline] smp_apic_timer_interrupt+0x11a/0x460 arch/x86/kernel/apic/apic.c:1149 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:834 RIP: 0010:unwind_next_frame+0x1039/0x1ea0 arch/x86/kernel/unwind_orc.c:534 Code: 38 84 c0 4c 8b 6c 24 10 0f 85 bb 0c 00 00 48 8b 44 24 50 c6 00 00 ba 10 00 00 00 48 8b 7c 24 38 31 f6 e8 0a 26 64 00 4c 89 f3 <48> 8b 54 24 18 e9 de 04 00 00 48 89 5c 24 70 49 8d 7d 08 48 89 f8 RSP: 0018:ffff8881eb05ede0 EFLAGS: 00000256 ORIG_RAX: ffffffffffffff13 RAX: ffff8881eb05f130 RBX: ffff8881eb05f0e0 RCX: 0000000000000000 RDX: 0000000000000010 RSI: 0000000000000000 RDI: ffff8881eb05f140 RBP: ffff8881eb05f0d0 R08: dffffc0000000000 R09: ffff8881eb05f130 R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffffffff0ceffbd R13: ffffffff8677fde8 R14: ffff8881eb05f0e0 R15: dffffc0000000000 arch_stack_walk+0x111/0x140 arch/x86/kernel/stacktrace.c:25 stack_trace_save+0x118/0x1c0 kernel/stacktrace.c:123 save_stack mm/kasan/common.c:70 [inline] set_track mm/kasan/common.c:78 [inline] __kasan_kmalloc+0x171/0x210 mm/kasan/common.c:529 slab_post_alloc_hook mm/slab.h:584 [inline] slab_alloc_node mm/slub.c:2829 [inline] slab_alloc mm/slub.c:2837 [inline] kmem_cache_alloc+0xd9/0x250 mm/slub.c:2842 kmem_cache_zalloc include/linux/slab.h:680 [inline] __kernfs_new_node+0xdb/0x6e0 fs/kernfs/dir.c:639 kernfs_new_node+0x130/0x230 fs/kernfs/dir.c:717 kernfs_create_dir_ns+0x3f/0x120 fs/kernfs/dir.c:1041 sysfs_create_dir_ns+0x185/0x390 fs/sysfs/dir.c:59 create_dir lib/kobject.c:89 [inline] kobject_add_internal+0x6b7/0xca0 lib/kobject.c:263 kobject_add_varg lib/kobject.c:398 [inline] kobject_add+0x14e/0x210 lib/kobject.c:450 device_add+0x3eb/0xbb0 drivers/base/core.c:2841 netdev_register_kobject+0x176/0x310 net/core/net-sysfs.c:1854 register_netdevice+0xbc5/0x12a0 net/core/dev.c:9190 tun_set_iff+0x7f7/0xdc0 drivers/net/tun.c:2917 __tun_chr_ioctl+0x8a9/0x1d00 drivers/net/tun.c:3182 do_vfs_ioctl+0x742/0x1720 fs/ioctl.c:47 ksys_ioctl fs/ioctl.c:742 [inline] __do_sys_ioctl fs/ioctl.c:749 [inline] __se_sys_ioctl fs/ioctl.c:747 [inline] __x64_sys_ioctl+0xd4/0x110 fs/ioctl.c:747 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 RIP: 0033:0x7f3505bf0f69 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:00007f3504f6b0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f3505d27f80 RCX: 00007f3505bf0f69 RDX: 0000000020000180 RSI: 00000000400454ca RDI: 0000000000000005 RBP: 00007f3505c4e6fe R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f3505d27f80 R15: 00007ffdc81c7098 Modules linked in: CR2: 0000000000000000 ---[ end trace b4efcc872115f4f4 ]--- RIP: 0010:0x0 Code: Bad RIP value. RSP: 0018:ffff8881f6f09d18 EFLAGS: 00010202 RAX: ffffffff8154d7aa RBX: 0000000000000101 RCX: ffff8881ebb1ee40 RDX: 0000000000000101 RSI: 0000000000000000 RDI: ffff8881d43fb1c0 RBP: ffff8881f6f09ec8 R08: ffffffff8154d3ee R09: 0000000000000003 R10: ffffffffffffffff R11: dffffc0000000001 R12: 00000000ffff9c08 R13: dffffc0000000000 R14: 0000000000000000 R15: ffff8881d43fb1c0 FS: 00007f3504f6b6c0(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffffffffd6 CR3: 00000001ecfc3000 CR4: 00000000003406a0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess): 0: 38 84 c0 4c 8b 6c 24 cmp %al,0x246c8b4c(%rax,%rax,8) 7: 10 0f adc %cl,(%rdi) 9: 85 bb 0c 00 00 48 test %edi,0x4800000c(%rbx) f: 8b 44 24 50 mov 0x50(%rsp),%eax 13: c6 00 00 movb $0x0,(%rax) 16: ba 10 00 00 00 mov $0x10,%edx 1b: 48 8b 7c 24 38 mov 0x38(%rsp),%rdi 20: 31 f6 xor %esi,%esi 22: e8 0a 26 64 00 call 0x642631 27: 4c 89 f3 mov %r14,%rbx * 2a: 48 8b 54 24 18 mov 0x18(%rsp),%rdx <-- trapping instruction 2f: e9 de 04 00 00 jmp 0x512 34: 48 89 5c 24 70 mov %rbx,0x70(%rsp) 39: 49 8d 7d 08 lea 0x8(%r13),%rdi 3d: 48 89 f8 mov %rdi,%rax