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 *390436 98811 0 0 0x4000000 0 syz-executor.1 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff823c4058) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff8242be75,ffffffff823d9a93,3ab,ffffffff823983a3) at __assert+0x2b sys/kern/subr_prf.c:154 rtm_output(ffff800000b05b00,ffff80001f7e3110,ffff80001f7e3068,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd80637a5700,fffffd805809cb18,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd805809cb18,9,fffffd80637a5700,0,0,ffff80001d6c23a0) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd805809cb18,0,ffff80001f7e3300,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6c23a0,5,ffff80001f7e33e0,0,ffff80001f7e34c0) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6c23a0,ffff80001f7e3478,ffff80001f7e34c0) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001f7e3540) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x5062868510, 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(ffffffff823c4058) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff8242be75,ffffffff823d9a93,3ab,ffffffff823983a3) at __assert+0x2b sys/kern/subr_prf.c:154 rtm_output(ffff800000b05b00,ffff80001f7e3110,ffff80001f7e3068,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd80637a5700,fffffd805809cb18,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd805809cb18,9,fffffd80637a5700,0,0,ffff80001d6c23a0) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd805809cb18,0,ffff80001f7e3300,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6c23a0,5,ffff80001f7e33e0,0,ffff80001f7e34c0) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6c23a0,ffff80001f7e3478,ffff80001f7e34c0) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001f7e3540) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x5062868510, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001f7e2ee0 rbx 0xffff80001f7e2f90 rdx 0x2 rcx 0 rax 0x1 r8 0xffffffff81c35ebf kprintf+0x15f r9 0x1 r10 0x2 r11 0xdba0f2c421346efb r12 0x3000000008 r13 0xffff80001f7e2ef0 r14 0x100 r15 0x1 rip 0xffffffff815297e8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001f7e2ed0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=390436 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=56, nice=20 forw=0xffffffffffffffff, list=0xffff80001d6c2880,0xffffffff8280e640 process=0xffff8000ffffae70 user=0xffff80001f7de000, vmspace=0xfffffd80579d9228 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 98811 61263 83833 0 2 0 syz-executor.1 *98811 390436 83833 0 7 0x4000000 syz-executor.1 70625 398839 61599 0 2 0x480 syz-executor.0 70625 143814 61599 0 3 0x4000080 netcon syz-executor.0 70625 189733 61599 0 3 0x4000080 fsleep syz-executor.0 83833 42593 14862 0 3 0x82 nanosleep syz-executor.1 43811 357996 0 0 3 0x14200 acct acct 88133 107204 0 0 3 0x14200 bored sosplice 61599 242737 14862 0 2 0x482 syz-executor.0 14862 6082 93129 0 3 0x82 thrsleep syz-fuzzer 14862 148231 93129 0 3 0x4000082 thrsleep syz-fuzzer 14862 50978 93129 0 3 0x4000082 kqread syz-fuzzer 14862 21872 93129 0 3 0x4000082 thrsleep syz-fuzzer 14862 63015 93129 0 3 0x4000082 thrsleep syz-fuzzer 14862 21173 93129 0 3 0x4000082 thrsleep syz-fuzzer 14862 4259 93129 0 3 0x4000082 thrsleep syz-fuzzer 14862 120392 93129 0 3 0x4000082 thrsleep syz-fuzzer 93129 76987 66789 0 3 0x10008a pause ksh 66789 466217 28037 0 3 0x92 select sshd 40320 341850 1 0 3 0x100083 ttyin getty 28037 462126 1 0 3 0x80 select sshd 77189 51901 88175 73 3 0x100090 kqread syslogd 88175 206375 1 0 3 0x100082 netio syslogd 54913 150089 1 77 3 0x100090 poll dhclient 78394 10725 1 0 3 0x80 poll dhclient 5649 247175 0 0 3 0x14200 bored smr 78062 118456 0 0 2 0x14200 zerothread 83076 329176 0 0 3 0x14200 aiodoned aiodoned 9393 31796 0 0 3 0x14200 syncer update 17096 129766 0 0 3 0x14200 cleaner cleaner 33331 488880 0 0 3 0x14200 reaper reaper 90916 1209 0 0 3 0x14200 pgdaemon pagedaemon 53864 397790 0 0 3 0x14200 bored crynlk 58225 479440 0 0 3 0x14200 bored crypto 76224 430560 0 0 3 0x40014200 acpi0 acpi0 83397 250684 0 0 3 0x14200 bored softnet 9790 380995 0 0 3 0x14200 bored systqmp 27869 91623 0 0 3 0x14200 bored systq 28338 186264 0 0 2 0x40014200 softclock 42833 512506 0 0 3 0x40014200 idle0 1 441454 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 9517 6348K 6801K 78643K 11118 0 pcb 13 8K 8K 78643K 127 0 rtable 99 3K 7K 78643K 810 0 ifaddr 84 16K 17K 78643K 265 0 sysctl 2 0K 0K 78643K 2 0 counters 21 16K 16K 78643K 25 0 ioctlops 0 0K 4K 78643K 111 0 iov 0 0K 32K 78643K 102 0 mount 1 1K 1K 78643K 1 0 vnodes 1217 77K 77K 78643K 1443 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 3 0 VM map 2 0K 0K 78643K 2 0 sem 12 0K 0K 78643K 91 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1809 195K 288K 78643K 12938 0 file desc 6 17K 25K 78643K 514 0 sigio 0 0K 0K 78643K 10 0 proc 49 38K 63K 78643K 504 0 subproc 32 2K 2K 78643K 68 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 50 0 in_multi 78 4K 4K 78643K 137 0 ether_multi 1 0K 0K 78643K 14 0 mrt 0 0K 0K 78643K 8 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 259 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 128 71K 80K 78643K 2105 0 UVM aobj 34 4K 4K 78643K 34 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 91 0 NDP 14 0K 0K 78643K 27 0 temp 119 3846K 3910K 78643K 18351 0 kqueue 3 4K 18K 78643K 37 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 16 0 9 1 0 1 1 0 8 0 rtpcb 80 66 0 63 1 0 1 1 0 8 0 rtentry 112 82 0 42 2 0 2 2 0 8 0 unpcb 120 248 0 240 1 0 1 1 0 8 0 syncache 264 10 0 10 4 3 1 1 0 8 1 tcpqe 32 12 0 12 1 1 0 1 0 8 0 tcpcb 544 968 0 960 4 2 2 2 0 8 1 inpcb 280 1336 0 1326 3 1 2 2 0 8 0 rttmr 72 3 0 3 3 3 0 1 0 8 0 nd6 48 12 0 8 1 0 1 1 0 8 0 pkpcb 40 2 0 2 1 1 0 1 0 8 0 swfcl 56 2 0 0 1 0 1 1 0 8 0 pfrktable 1344 220 0 220 1 1 0 1 0 8 0 pftag 88 44 0 44 1 1 0 1 0 8 0 pfrule 1360 32 0 26 1 0 1 1 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 305 0 119 13 0 13 13 0 8 1 art_table 32 307 0 119 2 0 2 2 0 8 0 art_node 16 81 0 45 1 0 1 1 0 8 0 sysvmsgpl 40 6 0 6 2 1 1 1 0 8 1 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 87 0 77 1 0 1 1 0 8 0 shmpl 112 32 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 2147 0 748 88 0 88 88 0 8 0 ffsino 240 2147 0 748 83 0 83 83 0 8 0 nchpl 144 3126 0 1540 60 0 60 60 0 8 0 uvmvnodes 72 2344 0 0 43 0 43 43 0 8 0 vnodes 208 2344 0 0 124 0 124 124 0 8 0 namei 1024 8817 0 8817 2 1 1 1 0 8 1 vcpupl 1984 7 0 0 1 0 1 1 0 8 0 vmpool 528 11 0 4 1 0 1 1 0 8 0 pfiaddrpl 120 66 0 66 1 1 0 1 0 8 0 scxspl 192 9753 0 9753 1 0 1 1 0 8 1 plimitpl 152 49 0 42 1 0 1 1 0 8 0 sigapl 424 696 0 665 4 0 4 4 0 8 0 futexpl 56 11708 0 11707 2 1 1 1 0 8 0 knotepl 112 134 0 115 1 0 1 1 0 8 0 kqueuepl 144 105 0 102 1 0 1 1 0 8 0 pipelkpl 16 150 0 140 1 0 1 1 0 8 0 pipepl 120 300 0 281 1 0 1 1 0 8 0 fdescpl 432 680 0 665 2 0 2 2 0 8 0 filepl 120 4846 0 4745 4 0 4 4 0 8 0 lockfpl 104 119 0 118 1 0 1 1 0 8 0 lockfspl 48 47 0 46 1 0 1 1 0 8 0 sessionpl 112 19 0 9 1 0 1 1 0 8 0 pgrppl 48 21 0 11 1 0 1 1 0 8 0 ucredpl 96 408 0 401 1 0 1 1 0 8 0 zombiepl 144 665 0 665 1 0 1 1 0 8 1 processpl 920 696 0 665 4 0 4 4 0 8 0 procpl 624 1262 0 1221 5 1 4 4 0 8 0 sosppl 128 9 0 9 4 4 0 1 0 8 0 sockpl 400 1654 0 1633 6 3 3 4 0 8 0 mcl64k 65536 280 0 278 29 28 1 29 0 8 0 mcl16k 16384 2 0 2 1 1 0 1 0 8 0 mcl12k 12288 18 0 18 2 1 1 1 0 8 1 mcl9k 9216 11 0 11 2 1 1 1 0 8 1 mcl8k 8192 15 0 15 3 2 1 1 0 8 1 mcl4k 4096 49 0 49 3 2 1 1 0 8 1 mcl2k2 2112 3 0 3 2 2 0 1 0 8 0 mcl2k 2048 74252 0 74209 18 12 6 14 0 8 0 mtagpl 80 58 0 24 2 1 1 1 0 8 0 mbufpl 256 121910 0 121512 42 16 26 37 0 8 0 bufpl 280 4968 0 130 346 0 346 346 0 8 0 anonpl 16 95806 0 81093 86 11 75 81 0 107 6 amapchunkpl 152 4671 0 4542 25 13 12 19 0 158 6 amappl16 192 3759 0 2840 67 14 53 58 0 8 5 amappl15 184 9 0 7 1 0 1 1 0 8 0 amappl14 176 181 0 177 1 0 1 1 0 8 0 amappl13 168 40 0 37 1 0 1 1 0 8 0 amappl12 160 184 0 180 1 0 1 1 0 8 0 amappl11 152 106 0 95 1 0 1 1 0 8 0 amappl10 144 13 0 7 1 0 1 1 0 8 0 amappl9 136 608 0 605 1 0 1 1 0 8 0 amappl8 128 601 0 564 2 0 2 2 0 8 0 amappl7 120 120 0 107 1 0 1 1 0 8 0 amappl6 112 77 0 72 2 1 1 1 0 8 0 amappl5 104 609 0 597 1 0 1 1 0 8 0 amappl4 96 448 0 422 1 0 1 1 0 8 0 amappl3 88 125 0 120 1 0 1 1 0 8 0 amappl2 80 4645 0 4567 2 0 2 2 0 8 0 amappl1 72 21662 0 21227 24 15 9 17 0 8 0 amappl 80 1560 0 1515 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 33 0 0 1 0 1 1 0 8 0 uaddrrnd 24 691 0 669 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 691 0 669 1 0 1 1 0 8 0 vmmpekpl 168 7835 0 7801 2 0 2 2 0 8 0 vmmpepl 168 88543 0 86389 152 29 123 123 0 357 29 vmsppl 272 690 0 669 2 0 2 2 0 8 0 pdppl 4096 1388 0 1345 7 1 6 6 0 8 0 pvpl 32 256146 0 238866 189 11 178 185 0 265 22 pmappl 200 690 0 669 3 1 2 2 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 314 0 71 9 1 8 9 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(ffffffff823c4058) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff8242be75,ffffffff823d9a93,3ab,ffffffff823983a3) at __assert+0x2b sys/kern/subr_prf.c:154 rtm_output(ffff800000b05b00,ffff80001f7e3110,ffff80001f7e3068,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd80637a5700,fffffd805809cb18,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd805809cb18,9,fffffd80637a5700,0,0,ffff80001d6c23a0) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd805809cb18,0,ffff80001f7e3300,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6c23a0,5,ffff80001f7e33e0,0,ffff80001f7e34c0) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6c23a0,ffff80001f7e3478,ffff80001f7e34c0) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001f7e3540) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x5062868510, 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(ffffffff823c4058) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff8242be75,ffffffff823d9a93,3ab,ffffffff823983a3) at __assert+0x2b sys/kern/subr_prf.c:154 rtm_output(ffff800000b05b00,ffff80001f7e3110,ffff80001f7e3068,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd80637a5700,fffffd805809cb18,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd805809cb18,9,fffffd80637a5700,0,0,ffff80001d6c23a0) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd805809cb18,0,ffff80001f7e3300,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6c23a0,5,ffff80001f7e33e0,0,ffff80001f7e34c0) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6c23a0,ffff80001f7e3478,ffff80001f7e34c0) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001f7e3540) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x5062868510, count: -11