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 *218234 26516 0 0 0x4000000 0 syz-executor.0 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff821dd1e7) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff82234954,ffffffff821f058d,3ab,ffffffff821bd5b1) at __assert+0x2b sys/kern/subr_prf.c:154 rtm_output(ffff800000a3a400,ffff80001d80c4d0,ffff80001d80c428,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd805e346700,fffffd80628b74b0,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd80628b74b0,9,fffffd805e346700,0,0,ffff80001d729c38) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd80628b74b0,0,ffff80001d80c6c0,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d729c38,4,ffff80001d80c7a0,0,ffff80001d80c880) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d729c38,ffff80001d80c838,ffff80001d80c880) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001d80c900) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x16d10ec4870, 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(ffffffff821dd1e7) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff82234954,ffffffff821f058d,3ab,ffffffff821bd5b1) at __assert+0x2b sys/kern/subr_prf.c:154 rtm_output(ffff800000a3a400,ffff80001d80c4d0,ffff80001d80c428,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd805e346700,fffffd80628b74b0,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd80628b74b0,9,fffffd805e346700,0,0,ffff80001d729c38) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd80628b74b0,0,ffff80001d80c6c0,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d729c38,4,ffff80001d80c7a0,0,ffff80001d80c880) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d729c38,ffff80001d80c838,ffff80001d80c880) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001d80c900) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x16d10ec4870, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001d80c2a0 rbx 0xffff80001d80c350 rdx 0x2 rcx 0 rax 0x1 r8 0xffffffff813a55ef kprintf+0x15f r9 0x1 r10 0x2 r11 0x4253a8729f65723d r12 0x3000000008 r13 0xffff80001d80c2b0 r14 0x100 r15 0x1 rip 0xffffffff812bfa38 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001d80c290 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=218234 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=76, nice=20 forw=0xffffffffffffffff, list=0xffff80001d72a118,0xffffffff825b67d0 process=0xffff8000ffffb5a0 user=0xffff80001d807000, vmspace=0xfffffd806bc0aaa0 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 26516 109654 53801 0 2 0 syz-executor.0 *26516 218234 53801 0 7 0x4000000 syz-executor.0 95117 231476 0 0 3 0x14200 bored sosplice 53801 33876 1622 0 2 0x482 syz-executor.0 1622 430880 11705 0 3 0x82 thrsleep syz-fuzzer 1622 157492 11705 0 2 0x4000482 syz-fuzzer 1622 407270 11705 0 2 0x4000002 syz-fuzzer 1622 478851 11705 0 3 0x4000082 thrsleep syz-fuzzer 1622 48864 11705 0 3 0x4000082 thrsleep syz-fuzzer 1622 458870 11705 0 3 0x4000082 kqread syz-fuzzer 1622 181950 11705 0 3 0x4000082 thrsleep syz-fuzzer 1622 447620 11705 0 3 0x4000082 thrsleep syz-fuzzer 11705 442358 37223 0 3 0x10008a pause ksh 37223 85804 23026 0 3 0x92 select sshd 19440 350748 1 0 3 0x100083 ttyin getty 23026 204048 1 0 3 0x80 select sshd 12790 74708 55586 73 3 0x100090 kqread syslogd 55586 253984 1 0 3 0x100082 netio syslogd 56257 296382 1 77 3 0x100090 poll dhclient 77301 383985 1 0 3 0x80 poll dhclient 68924 492646 0 0 3 0x14200 bored smr 61158 474881 0 0 2 0x14200 zerothread 71318 107098 0 0 3 0x14200 aiodoned aiodoned 99079 281430 0 0 3 0x14200 syncer update 17044 126906 0 0 3 0x14200 cleaner cleaner 68708 241500 0 0 3 0x14200 reaper reaper 36059 343491 0 0 3 0x14200 pgdaemon pagedaemon 89659 348446 0 0 3 0x14200 bored crynlk 69157 95298 0 0 3 0x14200 bored crypto 90333 313536 0 0 3 0x40014200 acpi0 acpi0 41954 53353 0 0 3 0x14200 bored softnet 17302 410966 0 0 3 0x14200 bored systqmp 66046 163215 0 0 3 0x14200 bored systq 66176 156074 0 0 2 0x40014200 softclock 5507 397528 0 0 3 0x40014200 idle0 1 87853 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 9471 6330K 6655K 78643K 10815 0 pcb 13 8K 8K 78643K 37 0 rtable 77 5K 9K 78643K 363 0 ifaddr 51 11K 15K 78643K 115 0 sysctl 2 0K 0K 78643K 2 0 counters 20 16K 16K 78643K 25 0 ioctlops 0 0K 4K 78643K 49 0 iov 0 0K 16K 78643K 23 0 mount 1 1K 1K 78643K 1 0 vnodes 1221 77K 77K 78643K 1308 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 5 0 VM map 2 0K 0K 78643K 2 0 sem 12 0K 1K 78643K 24 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1809 195K 288K 78643K 12938 0 file desc 4 9K 25K 78643K 197 0 sigio 0 0K 0K 78643K 10 0 proc 49 38K 54K 78643K 368 0 subproc 16 1K 2K 78643K 34 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 11 0 in_multi 47 2K 3K 78643K 64 0 ether_multi 1 0K 0K 78643K 3 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 43 201K 201K 78643K 43 0 exec 0 0K 1K 78643K 187 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 111 14K 23K 78643K 1341 0 UVM aobj 4 2K 3K 78643K 8 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 8 0 NDP 7 0K 0K 78643K 16 0 temp 87 3040K 3105K 78643K 5285 0 kqueue 3 4K 16K 78643K 10 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 6 0 2 1 0 1 1 0 8 0 rtpcb 80 34 0 31 1 0 1 1 0 8 0 rtentry 112 46 0 23 2 0 2 2 0 8 0 unpcb 120 89 0 81 1 0 1 1 0 8 0 syncache 264 5 0 5 2 2 0 1 0 8 0 tcpcb 544 51 0 47 1 0 1 1 0 8 0 ipq 40 2 0 2 1 0 1 1 0 8 1 ipqe 40 6 0 6 1 0 1 1 0 8 1 inpcb 280 553 0 545 2 0 2 2 0 8 1 ip6q 72 1 0 1 1 0 1 1 0 8 1 ip6af 40 2 0 2 1 0 1 1 0 8 1 nd6 48 6 0 3 1 0 1 1 0 8 0 ppxss 1128 1 0 1 1 1 0 1 0 8 0 pfrktable 1344 61 0 56 2 0 2 2 0 8 1 pftag 88 12 0 10 1 0 1 1 0 8 0 pfrule 1360 19 0 14 1 0 1 1 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 193 0 85 12 1 11 12 0 8 2 art_table 32 195 0 85 2 0 2 2 0 8 0 art_node 16 45 0 25 1 0 1 1 0 8 0 sysvmsgpl 40 8 0 6 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 16 0 6 1 0 1 1 0 8 0 shmpl 112 6 0 4 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1643 0 246 88 0 88 88 0 8 0 ffsino 240 1643 0 246 83 0 83 83 0 8 0 nchpl 144 2110 0 529 60 0 60 60 0 8 0 uvmvnodes 72 1745 0 0 32 0 32 32 0 8 0 vnodes 208 1745 0 0 92 0 92 92 0 8 0 namei 1024 5366 0 5366 1 0 1 1 0 8 1 vmpool 528 2 0 2 1 1 0 1 0 8 0 pfiaddrpl 120 19 0 16 1 0 1 1 0 8 0 scxspl 192 5444 0 5444 1 0 1 1 0 8 1 plimitpl 152 28 0 22 1 0 1 1 0 8 0 sigapl 424 384 0 356 4 0 4 4 0 8 0 futexpl 56 3833 0 3833 1 0 1 1 0 8 1 knotepl 112 69 0 52 1 0 1 1 0 8 0 kqueuepl 144 26 0 23 1 0 1 1 0 8 0 pipelkpl 16 96 0 87 1 0 1 1 0 8 0 pipepl 120 192 0 177 1 0 1 1 0 8 0 fdescpl 432 369 0 356 2 0 2 2 0 8 0 filepl 120 2262 0 2185 4 0 4 4 0 8 1 lockfpl 104 46 0 45 1 0 1 1 0 8 0 lockfspl 48 16 0 15 1 0 1 1 0 8 0 sessionpl 112 17 0 8 1 0 1 1 0 8 0 pgrppl 48 19 0 10 1 0 1 1 0 8 0 ucredpl 96 182 0 175 1 0 1 1 0 8 0 zombiepl 144 356 0 356 1 0 1 1 0 8 1 processpl 920 384 0 356 4 0 4 4 0 8 0 procpl 624 624 0 588 4 0 4 4 0 8 1 sosppl 128 4 0 4 1 1 0 1 0 8 0 sockpl 400 683 0 664 5 1 4 4 0 8 2 mcl64k 65536 6 0 6 1 0 1 1 0 8 1 mcl16k 16384 1 0 1 1 1 0 1 0 8 0 mcl12k 12288 2 0 2 1 1 0 1 0 8 0 mcl9k 9216 6 0 6 2 1 1 1 0 8 1 mcl8k 8192 5 0 5 1 0 1 1 0 8 1 mcl4k 4096 22 0 22 2 1 1 1 0 8 1 mcl2k2 2112 3 0 3 1 0 1 1 0 8 1 mcl2k 2048 75481 0 75436 14 7 7 12 0 8 1 mtagpl 80 25 0 11 2 1 1 1 0 8 0 mbufpl 256 120514 0 120416 13 2 11 11 0 8 1 bufpl 280 3489 0 127 241 0 241 241 0 8 0 anonpl 16 57411 0 42357 83 4 79 80 0 107 14 amapchunkpl 152 1865 0 1737 12 4 8 9 0 158 2 amappl16 192 2135 0 1257 59 9 50 56 0 8 5 amappl15 184 82 0 80 1 0 1 1 0 8 0 amappl14 176 24 0 18 1 0 1 1 0 8 0 amappl13 168 28 0 26 1 0 1 1 0 8 0 amappl12 160 10 0 8 1 0 1 1 0 8 0 amappl11 152 121 0 112 1 0 1 1 0 8 0 amappl10 144 11 0 8 1 0 1 1 0 8 0 amappl9 136 365 0 363 1 0 1 1 0 8 0 amappl8 128 321 0 284 2 0 2 2 0 8 0 amappl7 120 116 0 102 1 0 1 1 0 8 0 amappl6 112 106 0 100 1 0 1 1 0 8 0 amappl5 104 243 0 232 1 0 1 1 0 8 0 amappl4 96 501 0 473 1 0 1 1 0 8 0 amappl3 88 106 0 101 1 0 1 1 0 8 0 amappl2 80 2133 0 2069 2 0 2 2 0 8 0 amappl1 72 16541 0 16133 24 15 9 17 0 8 0 amappl 80 868 0 829 1 0 1 1 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 7 0 4 1 0 1 1 0 8 0 uaddrrnd 24 371 0 358 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 371 0 358 1 0 1 1 0 8 0 vmmpekpl 168 6489 0 6466 2 0 2 2 0 8 0 vmmpepl 168 51086 0 49190 113 13 100 107 0 357 15 vmsppl 272 370 0 358 3 2 1 2 0 8 0 pdppl 4096 748 0 716 6 1 5 6 0 8 0 pvpl 32 168780 0 150807 193 3 190 191 0 265 36 pmappl 200 370 0 358 1 0 1 1 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 243 0 18 7 0 7 7 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(ffffffff821dd1e7) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff82234954,ffffffff821f058d,3ab,ffffffff821bd5b1) at __assert+0x2b sys/kern/subr_prf.c:154 rtm_output(ffff800000a3a400,ffff80001d80c4d0,ffff80001d80c428,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd805e346700,fffffd80628b74b0,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd80628b74b0,9,fffffd805e346700,0,0,ffff80001d729c38) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd80628b74b0,0,ffff80001d80c6c0,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d729c38,4,ffff80001d80c7a0,0,ffff80001d80c880) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d729c38,ffff80001d80c838,ffff80001d80c880) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001d80c900) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x16d10ec4870, 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(ffffffff821dd1e7) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff82234954,ffffffff821f058d,3ab,ffffffff821bd5b1) at __assert+0x2b sys/kern/subr_prf.c:154 rtm_output(ffff800000a3a400,ffff80001d80c4d0,ffff80001d80c428,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd805e346700,fffffd80628b74b0,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd80628b74b0,9,fffffd805e346700,0,0,ffff80001d729c38) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd80628b74b0,0,ffff80001d80c6c0,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d729c38,4,ffff80001d80c7a0,0,ffff80001d80c880) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d729c38,ffff80001d80c838,ffff80001d80c880) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001d80c900) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x16d10ec4870, count: -11