BUG: kernel NULL pointer dereference, address: 000000000000000c #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 0 P4D 0 Oops: Oops: 0000 [#1] SMP KASAN NOPTI CPU: 1 UID: 0 PID: 5678 Comm: syz-executor Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 RIP: 0010:readl arch/x86/include/asm/io.h:59 [inline] RIP: 0010:handle_ep_small+0x84/0x1ca0 drivers/usb/gadget/udc/net2280.c:2530 Code: 37 fa 48 8d 43 50 48 89 c2 48 89 44 24 18 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 28 18 00 00 48 8b 43 50 <44> 8b 68 0c 48 8d 7b 78 44 89 6c 24 20 48 b8 00 00 00 00 00 fc ff RSP: 0018:ffffc900006a0948 EFLAGS: 00010046 RAX: 0000000000000000 RBX: ffff888035cea928 RCX: ffffffff87d2b586 RDX: 1ffff11006b9d52f RSI: ffffffff87d2965c RDI: ffff888035cea928 RBP: ffff888035cea9a8 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000000000020 R11: 0000000000000000 R12: ffffffffffffff88 R13: 0000000000000040 R14: ffff888035cea000 R15: 0000000000000020 FS: 0000555569b9d540(0000) GS:ffff8880d5ed8000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000000000000c CR3: 0000000036470000 CR4: 0000000000352ef0 Call Trace: handle_stat0_irqs drivers/usb/gadget/udc/net2280.c:3341 [inline] net2280_irq+0x854/0x4ea0 drivers/usb/gadget/udc/net2280.c:3552 __handle_irq_event_percpu+0x232/0x880 kernel/irq/handle.c:209 handle_irq_event_percpu kernel/irq/handle.c:246 [inline] handle_irq_event+0xab/0x1e0 kernel/irq/handle.c:263 handle_fasteoi_irq+0x323/0xb60 kernel/irq/chip.c:768 generic_handle_irq_desc include/linux/irqdesc.h:188 [inline] handle_irq arch/x86/kernel/irq.c:209 [inline] call_irq_handler arch/x86/kernel/irq.c:265 [inline] __common_interrupt+0xd8/0x2f0 arch/x86/kernel/irq.c:280 common_interrupt+0x60/0xe0 arch/x86/kernel/irq.c:273 asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:665 RIP: 0010:__raw_spin_unlock_irq include/linux/spinlock_api_smp.h:188 [inline] RIP: 0010:_raw_spin_unlock_irq+0x29/0x50 kernel/locking/spinlock.c:206 Code: 90 f3 0f 1e fa 53 48 8b 74 24 08 48 89 fb 48 83 c7 18 e8 da 4f 27 f6 48 89 df e8 62 9f 27 f6 e8 1d 08 54 f6 fb bf 01 00 00 00 72 ae 16 f6 65 8b 05 bb d7 a5 08 85 c0 74 06 5b c3 cc cc cc cc RSP: 0018:ffffc900006a0ca8 EFLAGS: 00000206 RAX: 0000000000109784 RBX: ffff88806a53d2b8 RCX: 0000000000000004 RDX: 0000000000000000 RSI: ffffffff8e1a80b8 RDI: 0000000000000001 RBP: ffff88806a53d0e8 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000000 R12: ffffffff9b73f600 R13: ffff88806a53d2f8 R14: ffff88806a53d110 R15: ffff88806a53d110 spin_unlock_irq include/linux/spinlock.h:402 [inline] backlog_unlock_irq_enable net/core/dev.c:266 [inline] process_backlog+0xcb1/0x1580 net/core/dev.c:6705 __napi_poll.constprop.0+0xaf/0x450 net/core/dev.c:7735 napi_poll net/core/dev.c:7798 [inline] net_rx_action+0xa40/0xf20 net/core/dev.c:7955 handle_softirqs+0x1ea/0x9b0 kernel/softirq.c:622 do_softirq kernel/softirq.c:523 [inline] do_softirq+0xac/0xe0 kernel/softirq.c:510 __local_bh_enable_ip+0xf8/0x120 kernel/softirq.c:450 local_bh_enable include/linux/bottom_half.h:33 [inline] rcu_read_unlock_bh include/linux/rcupdate.h:914 [inline] __dev_queue_xmit+0xa27/0x4970 net/core/dev.c:4913 dev_queue_xmit include/linux/netdevice.h:3446 [inline] neigh_hh_output include/net/neighbour.h:544 [inline] neigh_output include/net/neighbour.h:558 [inline] ip_finish_output2+0xf4a/0x2400 net/ipv4/ip_output.c:236 __ip_finish_output.part.0+0x444/0x6f0 net/ipv4/ip_output.c:314 __ip_finish_output net/ipv4/ip_output.c:302 [inline] ip_finish_output net/ipv4/ip_output.c:324 [inline] NF_HOOK_COND include/linux/netfilter.h:307 [inline] ip_output+0x39b/0xc10 net/ipv4/ip_output.c:437 dst_output include/net/dst.h:470 [inline] ip_local_out+0x193/0x1f0 net/ipv4/ip_output.c:131 __ip_queue_xmit+0x885/0x1e90 net/ipv4/ip_output.c:533 __tcp_transmit_skb+0x3506/0x4f20 net/ipv4/tcp_output.c:1716 tcp_transmit_skb net/ipv4/tcp_output.c:1734 [inline] tcp_write_xmit+0x1130/0x8470 net/ipv4/tcp_output.c:3062 __tcp_push_pending_frames+0xaf/0x3b0 net/ipv4/tcp_output.c:3245 tcp_push_pending_frames include/net/tcp.h:2337 [inline] tcp_data_snd_check net/ipv4/tcp_input.c:6108 [inline] tcp_rcv_established+0xc34/0x3990 net/ipv4/tcp_input.c:6691 tcp_v4_do_rcv+0xbb6/0x1260 net/ipv4/tcp_ipv4.c:1854 sk_backlog_rcv include/net/sock.h:1190 [inline] __release_sock+0x35a/0x440 net/core/sock.c:3261 release_sock+0x1e5/0x280 net/core/sock.c:3860 tcp_sendmsg+0x38/0x50 net/ipv4/tcp.c:1452 inet_sendmsg+0xb9/0x140 net/ipv4/af_inet.c:865 sock_sendmsg_nosec net/socket.c:775 [inline] __sock_sendmsg net/socket.c:790 [inline] sock_write_iter+0x4ea/0x5b0 net/socket.c:1241 new_sync_write fs/read_write.c:595 [inline] vfs_write+0x6ac/0x1050 fs/read_write.c:687 ksys_write+0x1f8/0x250 fs/read_write.c:739 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x115/0x870 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7eff58f59197 Code: 48 89 fa 4c 89 df e8 a8 56 00 00 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 1a 5b c3 0f 1f 84 00 00 00 00 00 48 8b 44 24 10 0f 05 <5b> c3 0f 1f 80 00 00 00 00 83 e2 39 83 fa 08 75 de e8 23 ff ff ff RSP: 002b:00007ffc6921e4a0 EFLAGS: 00000202 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000555569b9d540 RCX: 00007eff58f59197 RDX: 0000000000032040 RSI: 00007eff52bcdfc0 RDI: 0000000000000003 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000032040 R13: 0000555569bb1270 R14: 00007ffc6921ea40 R15: 00007eff52bcdfc0 Modules linked in: CR2: 000000000000000c ---[ end trace 0000000000000000 ]--- RIP: 0010:readl arch/x86/include/asm/io.h:59 [inline] RIP: 0010:handle_ep_small+0x84/0x1ca0 drivers/usb/gadget/udc/net2280.c:2530 Code: 37 fa 48 8d 43 50 48 89 c2 48 89 44 24 18 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 28 18 00 00 48 8b 43 50 <44> 8b 68 0c 48 8d 7b 78 44 89 6c 24 20 48 b8 00 00 00 00 00 fc ff RSP: 0018:ffffc900006a0948 EFLAGS: 00010046 RAX: 0000000000000000 RBX: ffff888035cea928 RCX: ffffffff87d2b586 RDX: 1ffff11006b9d52f RSI: ffffffff87d2965c RDI: ffff888035cea928 RBP: ffff888035cea9a8 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000000000020 R11: 0000000000000000 R12: ffffffffffffff88 R13: 0000000000000040 R14: ffff888035cea000 R15: 0000000000000020 FS: 0000555569b9d540(0000) GS:ffff8880d5ed8000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000000000000c CR3: 0000000036470000 CR4: 0000000000352ef0 ---------------- Code disassembly (best guess), 1 bytes skipped: 0: fa cli 1: 48 8d 43 50 lea 0x50(%rbx),%rax 5: 48 89 c2 mov %rax,%rdx 8: 48 89 44 24 18 mov %rax,0x18(%rsp) d: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 14: fc ff df 17: 48 c1 ea 03 shr $0x3,%rdx 1b: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1) 1f: 0f 85 28 18 00 00 jne 0x184d 25: 48 8b 43 50 mov 0x50(%rbx),%rax * 29: 44 8b 68 0c mov 0xc(%rax),%r13d <-- trapping instruction 2d: 48 8d 7b 78 lea 0x78(%rbx),%rdi 31: 44 89 6c 24 20 mov %r13d,0x20(%rsp) 36: 48 rex.W 37: b8 00 00 00 00 mov $0x0,%eax 3c: 00 fc add %bh,%ah 3e: ff .byte 0xff