panic: kernel diagnostic assertion "ifp != NULL" failed: file "/syzkaller/managers/main/kernel/sys/net/rtsock.c", line 939 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *446468 62097 0 0 0x4000000 0 syz-executor.1 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff823c229c) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff8242ac14,ffffffff823d6b3e,3ab,ffffffff82399ef9) at __assert+0x2b sys/kern/subr_prf.c:154 rtm_output(ffff800000b1b400,ffff80001f1d7230,ffff80001f1d7188,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd80586a2300,fffffd805e4ff960,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd805e4ff960,9,fffffd80586a2300,0,0,ffff80001d6aa118) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd805e4ff960,0,ffff80001f1d7420,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6aa118,5,ffff80001f1d7500,0,ffff80001f1d75e0) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6aa118,ffff80001f1d7598,ffff80001f1d75e0) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001f1d7660) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x129e3d3c9e0, count: 4 https://www.openbsd.org/ddb.html describes the minimum info required in bug reports. Insufficient info makes it difficult to find and fix bugs. ddb> ddb> set $lines = 0 ddb> set $maxwidth = 0 ddb> show panic kernel diagnostic assertion "ifp != NULL" failed: file "/syzkaller/managers/main/kernel/sys/net/rtsock.c", line 939 ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff823c229c) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff8242ac14,ffffffff823d6b3e,3ab,ffffffff82399ef9) at __assert+0x2b sys/kern/subr_prf.c:154 rtm_output(ffff800000b1b400,ffff80001f1d7230,ffff80001f1d7188,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd80586a2300,fffffd805e4ff960,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd805e4ff960,9,fffffd80586a2300,0,0,ffff80001d6aa118) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd805e4ff960,0,ffff80001f1d7420,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6aa118,5,ffff80001f1d7500,0,ffff80001f1d75e0) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6aa118,ffff80001f1d7598,ffff80001f1d75e0) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001f1d7660) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x129e3d3c9e0, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001f1d7000 rbx 0xffff80001f1d70b0 rdx 0x2 rcx 0 rax 0x1 r8 0xffffffff81ad64bf kprintf+0x15f r9 0x1 r10 0x2 r11 0x3542e19c059f21b6 r12 0x3000000008 r13 0xffff80001f1d7010 r14 0x100 r15 0x1 rip 0xffffffff8181e468 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001f1d6ff0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=446468 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=63, nice=20 forw=0xffffffffffffffff, list=0xffff80001d6aa868,0xffffffff8283c0a8 process=0xffff8000ffff8ae0 user=0xffff80001f1d2000, vmspace=0xfffffd8057849008 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 62097 50151 59345 0 2 0 syz-executor.1 *62097 446468 59345 0 7 0x4000000 syz-executor.1 217 455725 78458 0 2 0 syz-executor.0 217 327289 78458 0 3 0x4000080 select syz-executor.0 59345 237395 48471 0 3 0x82 nanosleep syz-executor.1 3224 456299 0 0 3 0x14200 bored sosplice 78458 325149 48471 0 3 0x82 nanosleep syz-executor.0 48471 401112 6252 0 3 0x82 thrsleep syz-fuzzer 48471 263254 6252 0 3 0x4000082 thrsleep syz-fuzzer 48471 469314 6252 0 3 0x4000082 thrsleep syz-fuzzer 48471 206294 6252 0 3 0x4000082 thrsleep syz-fuzzer 48471 470102 6252 0 3 0x4000082 thrsleep syz-fuzzer 48471 220064 6252 0 3 0x4000082 kqread syz-fuzzer 48471 110994 6252 0 3 0x4000082 thrsleep syz-fuzzer 48471 157318 6252 0 3 0x4000082 thrsleep syz-fuzzer 6252 93788 61927 0 3 0x10008a pause ksh 61927 276853 48753 0 3 0x92 select sshd 28391 72532 1 0 3 0x100083 ttyin getty 48753 181046 1 0 3 0x80 select sshd 30312 354151 62901 73 3 0x100090 kqread syslogd 62901 257217 1 0 3 0x100082 netio syslogd 57418 447107 1 77 3 0x100090 poll dhclient 83746 49538 1 0 3 0x80 poll dhclient 16633 336078 0 0 3 0x14200 bored smr 82537 199347 0 0 2 0x14200 zerothread 10986 377603 0 0 3 0x14200 aiodoned aiodoned 59786 513457 0 0 3 0x14200 syncer update 70346 344304 0 0 3 0x14200 cleaner cleaner 56310 90584 0 0 3 0x14200 reaper reaper 2891 228246 0 0 3 0x14200 pgdaemon pagedaemon 76507 188069 0 0 3 0x14200 bored crynlk 33395 345503 0 0 3 0x14200 bored crypto 42057 51556 0 0 3 0x40014200 acpi0 acpi0 24475 440678 0 0 3 0x14200 bored softnet 78172 89090 0 0 3 0x14200 bored systqmp 39183 502853 0 0 3 0x14200 bored systq 73182 20808 0 0 3 0x40014200 bored softclock 11490 294024 0 0 3 0x40014200 idle0 1 64195 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb> show all locks No such command ddb> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 9503 6352K 6738K 78643K 11232 0 pcb 13 8K 8K 78643K 81 0 rtable 112 4K 8K 78643K 586 0 ifaddr 90 18K 19K 78643K 228 0 counters 21 16K 16K 78643K 27 0 ioctlops 0 0K 4K 78643K 70 0 iov 0 0K 16K 78643K 71 0 mount 1 1K 1K 78643K 1 0 vnodes 1219 77K 77K 78643K 1428 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 11 0 VM map 2 0K 0K 78643K 2 0 sem 12 0K 0K 78643K 20 0 dirhash 9 1K 2K 78643K 12 0 ACPI 1809 195K 288K 78643K 12938 0 file desc 6 17K 25K 78643K 437 0 sigio 0 0K 0K 78643K 8 0 proc 49 38K 63K 78643K 434 0 subproc 32 2K 2K 78643K 51 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 27 0 in_multi 106 4K 4K 78643K 166 0 ether_multi 1 0K 0K 78643K 11 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 49 228K 228K 78643K 49 0 exec 0 0K 1K 78643K 260 0 pagedep 1 8K 8K 78643K 1 0 inodedep 1 32K 32K 78643K 1 0 newblk 1 0K 0K 78643K 1 0 VM swap 7 26K 26K 78643K 7 0 UVM amap 136 88K 104K 78643K 1904 0 UVM aobj 21 2K 2K 78643K 23 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 40 0 NDP 12 0K 0K 78643K 28 0 temp 119 3851K 3915K 78643K 8786 0 kqueue 3 4K 12K 78643K 31 0 SYN cache 2 16K 16K 78643K 2 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 10 0 3 1 0 1 1 0 8 0 rtpcb 80 56 0 53 1 0 1 1 0 8 0 rtentry 112 80 0 37 2 0 2 2 0 8 0 unpcb 120 178 0 170 1 0 1 1 0 8 0 syncache 264 12 0 12 3 2 1 1 0 8 1 tcpqe 32 69 0 69 1 1 0 1 0 8 0 tcpcb 544 160 0 156 1 0 1 1 0 8 0 inpcb 280 1050 0 1040 2 0 2 2 0 8 1 nd6 48 14 0 10 1 0 1 1 0 8 0 swfcl 56 1 0 0 1 0 1 1 0 8 0 pfosfp 40 1 0 0 1 0 1 1 0 8 0 pfosfpen 112 1 0 0 1 0 1 1 0 8 0 pfrktable 1344 117 0 115 2 1 1 1 0 8 0 pftag 88 26 0 26 2 1 1 1 0 8 1 pfrule 1360 24 0 20 1 0 1 1 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 359 0 172 13 0 13 13 0 8 0 art_table 32 361 0 172 2 0 2 2 0 8 0 art_node 16 77 0 37 1 0 1 1 0 8 0 sysvmsgpl 40 11 0 5 2 1 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 18 0 8 1 0 1 1 0 8 0 shmpl 112 21 0 2 1 0 1 1 0 8 0 dirhash 1024 17 0 10 3 0 3 3 0 8 1 dino2pl 256 1968 0 567 88 0 88 88 0 8 0 ffsino 240 1968 0 567 83 0 83 83 0 8 0 nchpl 144 2742 0 1163 60 0 60 60 0 8 0 uvmvnodes 72 2163 0 0 40 0 40 40 0 8 0 vnodes 208 2163 0 0 114 0 114 114 0 8 0 namei 1024 7344 0 7344 1 0 1 1 0 8 1 vcpupl 1984 6 0 0 1 0 1 1 0 8 0 vmpool 528 6 0 0 1 0 1 1 0 8 0 pfiaddrpl 120 36 0 34 2 1 1 1 0 8 0 scxspl 192 8207 0 8207 1 0 1 1 0 8 1 plimitpl 152 49 0 42 1 0 1 1 0 8 0 sigapl 424 621 0 591 4 0 4 4 0 8 0 futexpl 56 8855 0 8855 1 0 1 1 0 8 1 knotepl 112 113 0 94 1 0 1 1 0 8 0 kqueuepl 144 76 0 73 1 0 1 1 0 8 0 pipelkpl 16 144 0 134 1 0 1 1 0 8 0 pipepl 120 288 0 269 1 0 1 1 0 8 0 fdescpl 432 606 0 591 2 0 2 2 0 8 0 filepl 120 3831 0 3734 4 0 4 4 0 8 1 lockfpl 104 110 0 109 1 0 1 1 0 8 0 lockfspl 48 32 0 31 1 0 1 1 0 8 0 sessionpl 112 18 0 8 1 0 1 1 0 8 0 pgrppl 48 20 0 10 1 0 1 1 0 8 0 ucredpl 96 277 0 270 1 0 1 1 0 8 0 zombiepl 144 591 0 591 1 0 1 1 0 8 1 processpl 920 621 0 591 4 0 4 4 0 8 0 procpl 624 1124 0 1085 4 0 4 4 0 8 1 sockpl 400 1288 0 1269 5 1 4 4 0 8 2 mcl64k 65536 557 0 557 65 17 48 65 0 8 48 mcl16k 16384 1 0 1 1 1 0 1 0 8 0 mcl12k 12288 12 0 12 2 1 1 1 0 8 1 mcl9k 9216 9 0 9 2 2 0 1 0 8 0 mcl8k 8192 4 0 4 2 1 1 1 0 8 1 mcl4k 4096 45 0 45 2 1 1 1 0 8 1 mcl2k 2048 72372 0 72327 18 11 7 15 0 8 0 mtagpl 80 49 0 16 2 1 1 1 0 8 0 mbufpl 256 118034 0 117850 43 22 21 40 0 8 2 bufpl 280 4195 0 127 291 0 291 291 0 8 0 anonpl 16 84284 0 68465 86 13 73 80 0 107 8 amapchunkpl 152 3680 0 3531 22 2 20 20 0 158 13 amappl16 192 3691 0 2803 69 21 48 56 0 8 3 amappl15 184 4 0 2 1 0 1 1 0 8 0 amappl14 176 41 0 35 1 0 1 1 0 8 0 amappl13 168 42 0 38 1 0 1 1 0 8 0 amappl12 160 3 0 3 1 1 0 1 0 8 0 amappl11 152 51 0 41 1 0 1 1 0 8 0 amappl10 144 217 0 210 1 0 1 1 0 8 0 amappl9 136 567 0 564 1 0 1 1 0 8 0 amappl8 128 540 0 494 2 0 2 2 0 8 0 amappl7 120 314 0 299 1 0 1 1 0 8 0 amappl6 112 24 0 19 1 0 1 1 0 8 0 amappl5 104 537 0 525 1 0 1 1 0 8 0 amappl4 96 436 0 409 1 0 1 1 0 8 0 amappl3 88 122 0 116 1 0 1 1 0 8 0 amappl2 80 3954 0 3878 2 0 2 2 0 8 0 amappl1 72 20084 0 19653 24 15 9 17 0 8 0 amappl 80 1385 0 1335 2 0 2 2 0 84 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma256 256 6 0 6 1 1 0 1 0 8 0 dma128 128 253 0 253 1 1 0 1 0 8 0 dma64 64 6 0 6 1 1 0 1 0 8 0 dma32 32 7 0 7 1 1 0 1 0 8 0 dma16 16 18 0 17 1 0 1 1 0 8 0 aobjpl 64 22 0 2 1 0 1 1 0 8 0 uaddrrnd 24 612 0 591 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 612 0 591 1 0 1 1 0 8 0 vmmpekpl 168 7635 0 7606 2 0 2 2 0 8 0 vmmpepl 168 78397 0 76289 135 23 112 118 0 357 20 vmsppl 272 611 0 591 2 0 2 2 0 8 0 pdppl 4096 1230 0 1188 7 1 6 6 0 8 0 pvpl 32 233104 0 214589 193 12 181 188 0 265 30 pmappl 200 611 0 591 2 0 2 2 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 343 0 57 10 0 10 10 0 8 0 ddb> machine ddbcpu 0 No such command ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff823c229c) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff8242ac14,ffffffff823d6b3e,3ab,ffffffff82399ef9) at __assert+0x2b sys/kern/subr_prf.c:154 rtm_output(ffff800000b1b400,ffff80001f1d7230,ffff80001f1d7188,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd80586a2300,fffffd805e4ff960,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd805e4ff960,9,fffffd80586a2300,0,0,ffff80001d6aa118) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd805e4ff960,0,ffff80001f1d7420,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6aa118,5,ffff80001f1d7500,0,ffff80001f1d75e0) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6aa118,ffff80001f1d7598,ffff80001f1d75e0) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001f1d7660) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x129e3d3c9e0, count: -11 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff823c229c) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff8242ac14,ffffffff823d6b3e,3ab,ffffffff82399ef9) at __assert+0x2b sys/kern/subr_prf.c:154 rtm_output(ffff800000b1b400,ffff80001f1d7230,ffff80001f1d7188,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd80586a2300,fffffd805e4ff960,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd805e4ff960,9,fffffd80586a2300,0,0,ffff80001d6aa118) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd805e4ff960,0,ffff80001f1d7420,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6aa118,5,ffff80001f1d7500,0,ffff80001f1d75e0) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6aa118,ffff80001f1d7598,ffff80001f1d75e0) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001f1d7660) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x129e3d3c9e0, count: -11