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 *141275 85774 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(ffff800000a36d00,ffff80001d816640,ffff80001d816598,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd80539ad100,fffffd805e567af0,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd805e567af0,9,fffffd80539ad100,0,0,ffff80001d742d60) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd805e567af0,0,ffff80001d816830,0,0,82) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d742d60,4,ffff80001d816910,2,ffff80001d8169f0) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d742d60,ffff80001d8169a8,ffff80001d8169f0) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001d816a70) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x4a158071a60, 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(ffff800000a36d00,ffff80001d816640,ffff80001d816598,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd80539ad100,fffffd805e567af0,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd805e567af0,9,fffffd80539ad100,0,0,ffff80001d742d60) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd805e567af0,0,ffff80001d816830,0,0,82) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d742d60,4,ffff80001d816910,2,ffff80001d8169f0) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d742d60,ffff80001d8169a8,ffff80001d8169f0) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001d816a70) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x4a158071a60, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001d816410 rbx 0xffff80001d8164c0 rdx 0x2 rcx 0 rax 0x1 r8 0xffffffff813a55ef kprintf+0x15f r9 0x1 r10 0x2 r11 0x5cf34a7874edc4c5 r12 0x3000000008 r13 0xffff80001d816420 r14 0x100 r15 0x1 rip 0xffffffff812bfa38 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001d816400 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=141275 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=78, nice=20 forw=0xffffffffffffffff, list=0xffff80001d7419e0,0xffffffff825b67d0 process=0xffff800020ac2760 user=0xffff80001d811000, vmspace=0xfffffd805c3df228 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 85774 278332 32025 0 2 0 syz-executor.0 *85774 141275 32025 0 7 0x4000000 syz-executor.0 32025 409340 97828 0 2 0x482 syz-executor.0 57892 440773 0 0 3 0x14280 nfsidl nfsio 96667 90909 0 0 3 0x14280 nfsidl nfsio 33473 237794 0 0 3 0x14280 nfsidl nfsio 85098 402677 0 0 3 0x14280 nfsidl nfsio 37402 28566 0 0 3 0x14280 nfsidl nfsio 28928 308945 0 0 3 0x14280 nfsidl nfsio 95415 60362 0 0 3 0x14280 nfsidl nfsio 60771 361835 0 0 3 0x14280 nfsidl nfsio 18454 502793 0 0 3 0x14280 nfsidl nfsio 47491 275742 0 0 3 0x14280 nfsidl nfsio 48463 295266 0 0 3 0x14280 nfsidl nfsio 86822 452706 0 0 3 0x14280 nfsidl nfsio 46795 135286 0 0 3 0x14280 nfsidl nfsio 64805 197071 0 0 3 0x14280 nfsidl nfsio 92877 82629 0 0 3 0x14280 nfsidl nfsio 68902 278206 0 0 3 0x14280 nfsidl nfsio 57464 21851 0 0 3 0x14280 nfsidl nfsio 65708 381459 0 0 3 0x14280 nfsidl nfsio 45907 85847 0 0 3 0x14280 nfsidl nfsio 15780 221177 0 0 3 0x14280 nfsidl nfsio 70550 258762 0 0 3 0x14200 bored sosplice 86980 265337 0 0 3 0x14200 acct acct 99389 351975 97828 0 2 0x2 syz-executor.1 97828 333413 3730 0 3 0x82 thrsleep syz-fuzzer 97828 453172 3730 0 2 0x4000482 syz-fuzzer 97828 248315 3730 0 3 0x4000082 thrsleep syz-fuzzer 97828 179315 3730 0 3 0x4000082 thrsleep syz-fuzzer 97828 288514 3730 0 3 0x4000082 thrsleep syz-fuzzer 97828 521603 3730 0 3 0x4000082 kqread syz-fuzzer 97828 19205 3730 0 3 0x4000082 thrsleep syz-fuzzer 97828 440796 3730 0 3 0x4000082 thrsleep syz-fuzzer 3730 262620 38965 0 3 0x10008a pause ksh 38965 348516 87852 0 3 0x92 select sshd 94472 77743 1 0 3 0x100083 ttyin getty 87852 417320 1 0 3 0x80 select sshd 25013 222372 50010 73 3 0x100090 kqread syslogd 50010 17112 1 0 3 0x100082 netio syslogd 40956 408042 1 77 3 0x100090 poll dhclient 4831 235181 1 0 3 0x80 poll dhclient 60835 203815 0 0 3 0x14200 bored smr 5180 412385 0 0 2 0x14200 zerothread 52405 129538 0 0 3 0x14200 aiodoned aiodoned 57086 25468 0 0 3 0x14200 syncer update 1570 507575 0 0 3 0x14200 cleaner cleaner 77402 300632 0 0 3 0x14200 reaper reaper 53616 115462 0 0 3 0x14200 pgdaemon pagedaemon 81813 331943 0 0 3 0x14200 bored crynlk 49163 347209 0 0 3 0x14200 bored crypto 4662 381387 0 0 3 0x40014200 acpi0 acpi0 10496 4345 0 0 3 0x14200 bored softnet 3915 498575 0 0 3 0x14200 bored systqmp 89730 59726 0 0 3 0x14200 bored systq 97371 138356 0 0 3 0x40014200 bored softclock 45468 331636 0 0 3 0x40014200 idle0 1 378420 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 9523 6366K 6755K 78643K 11396 0 pcb 13 8K 8K 78643K 121 0 rtable 110 14K 18K 78643K 1019 0 ifaddr 83 15K 16K 78643K 196 0 counters 21 16K 16K 78643K 33 0 ioctlops 0 0K 4K 78643K 99 0 iov 0 0K 16K 78643K 110 0 mount 1 1K 1K 78643K 1 0 vnodes 1221 77K 77K 78643K 1512 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 2K 78643K 134 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1809 195K 288K 78643K 12938 0 file desc 5 13K 25K 78643K 600 0 sigio 0 0K 0K 78643K 20 0 proc 49 38K 55K 78643K 485 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 46 0 in_multi 58 3K 3K 78643K 142 0 ether_multi 1 0K 0K 78643K 20 0 mrt 0 0K 0K 78643K 7 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 67 307K 307K 78643K 67 0 exec 0 0K 1K 78643K 262 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 137 56K 56K 78643K 2376 0 UVM aobj 17 2K 2K 78643K 20 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 1K 78643K 100 0 NDP 14 0K 0K 78643K 35 0 temp 134 3044K 3127K 78643K 6785 0 kqueue 3 4K 16K 78643K 38 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 13 0 8 1 0 1 1 0 8 0 rtpcb 80 587 0 583 1 0 1 1 0 8 0 rtentry 112 81 0 46 2 0 2 2 0 8 0 unpcb 120 289 0 281 1 0 1 1 0 8 0 syncache 264 17 0 17 4 4 0 1 0 8 0 sackhl 24 2 0 2 1 1 0 1 0 8 0 tcpqe 32 34 0 34 2 2 0 1 0 8 0 tcpcb 544 225 0 221 1 0 1 1 0 8 0 ipq 40 2 0 2 2 2 0 1 0 8 0 ipqe 40 90 0 90 2 2 0 1 0 8 0 inpcb 280 611 0 603 5 3 2 2 0 8 1 rttmr 72 2 0 2 2 2 0 1 0 8 0 nd6 48 13 0 10 1 0 1 1 0 8 0 ppxss 1128 3 0 3 2 2 0 1 0 8 0 pfstscr 40 3 0 2 1 0 1 1 0 8 0 pfrke_plain 160 2 0 0 1 0 1 1 0 8 0 pfrktable 1344 74 0 69 2 1 1 2 0 8 0 pftag 88 15 0 12 2 1 1 1 0 8 0 pfstitem 24 3 0 1 1 0 1 1 0 8 0 pfstkey 112 5 0 3 1 0 1 1 0 8 0 pfstate 328 3 0 2 1 0 1 1 0 8 0 pfrule 1360 32 0 16 2 0 2 2 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 334 0 179 13 3 10 13 0 8 0 art_table 32 336 0 179 2 0 2 2 0 8 0 art_node 16 80 0 48 1 0 1 1 0 8 0 sysvmsgpl 40 14 0 6 2 1 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 122 0 112 1 0 1 1 0 8 0 shmpl 112 18 0 3 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 2277 0 878 88 0 88 88 0 8 0 ffsino 240 2277 0 878 83 0 83 83 0 8 0 nchpl 144 3337 0 1753 60 0 60 60 0 8 0 rtmask 32 4 0 2 1 0 1 1 0 8 0 uvmvnodes 72 2528 0 0 46 0 46 46 0 8 0 vnodes 208 2528 0 0 134 0 134 134 0 8 0 namei 1024 9301 0 9301 2 1 1 1 0 8 1 vcpupl 1984 4 0 0 1 0 1 1 0 8 0 vmpool 528 6 0 2 1 0 1 1 0 8 0 pfiaddrpl 120 24 0 20 1 0 1 1 0 8 0 scxspl 192 10145 0 10145 1 0 1 1 0 8 1 plimitpl 152 56 0 49 1 0 1 1 0 8 0 sigapl 424 802 0 752 6 0 6 6 0 8 0 futexpl 56 11805 0 11805 2 1 1 1 0 8 1 knotepl 112 131 0 112 1 0 1 1 0 8 0 kqueuepl 144 99 0 97 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 766 0 752 2 0 2 2 0 8 0 filepl 120 4919 0 4822 4 0 4 4 0 8 1 lockfpl 104 453 0 452 1 0 1 1 0 8 0 lockfspl 48 141 0 140 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 398 0 391 1 0 1 1 0 8 0 zombiepl 144 752 0 752 1 0 1 1 0 8 1 processpl 920 802 0 752 7 0 7 7 0 8 0 procpl 624 1544 0 1486 7 2 5 6 0 8 0 sosppl 128 10 0 10 2 2 0 1 0 8 0 sockpl 400 1488 0 1469 4 0 4 4 0 8 2 mcl64k 65536 708 0 708 66 45 21 33 0 8 21 mcl16k 16384 10 0 10 4 4 0 1 0 8 0 mcl12k 12288 17 0 17 4 3 1 1 0 8 1 mcl9k 9216 2 0 2 1 1 0 1 0 8 0 mcl8k 8192 47 0 47 4 3 1 1 0 8 1 mcl4k 4096 111 0 111 5 4 1 1 0 8 1 mcl2k2 2112 8 0 8 4 3 1 1 0 8 1 mcl2k 2048 67797 0 67753 15 8 7 11 0 8 1 mtagpl 80 63 0 38 2 1 1 1 0 8 0 mbufpl 256 117457 0 117300 55 33 22 32 0 8 8 bufpl 280 4815 0 136 335 0 335 335 0 8 0 anonpl 16 99872 0 86048 103 25 78 81 0 107 11 amapchunkpl 152 4329 0 4195 31 21 10 15 0 158 4 amappl16 192 4344 0 3428 82 28 54 58 0 8 8 amappl15 184 1 0 0 1 0 1 1 0 8 0 amappl14 176 32 0 26 1 0 1 1 0 8 0 amappl13 168 186 0 183 1 0 1 1 0 8 0 amappl12 160 296 0 293 1 0 1 1 0 8 0 amappl11 152 60 0 50 1 0 1 1 0 8 0 amappl10 144 170 0 165 1 0 1 1 0 8 0 amappl9 136 398 0 395 1 0 1 1 0 8 0 amappl8 128 398 0 353 2 0 2 2 0 8 0 amappl7 120 274 0 261 1 0 1 1 0 8 0 amappl6 112 23 0 19 1 0 1 1 0 8 0 amappl5 104 1059 0 1047 1 0 1 1 0 8 0 amappl4 96 529 0 499 1 0 1 1 0 8 0 amappl3 88 185 0 180 1 0 1 1 0 8 0 amappl2 80 5219 0 5152 2 0 2 2 0 8 0 amappl1 72 23258 0 22857 26 17 9 17 0 8 1 amappl 80 1813 0 1772 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 19 0 3 1 0 1 1 0 8 0 uaddrrnd 24 772 0 754 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 772 0 754 1 0 1 1 0 8 0 vmmpekpl 168 9037 0 9002 2 0 2 2 0 8 0 vmmpepl 168 99886 0 97855 163 39 124 124 0 357 31 vmsppl 272 771 0 754 2 0 2 2 0 8 0 pdppl 4096 1550 0 1512 7 1 6 6 0 8 1 pvpl 32 274814 0 258393 213 28 185 193 0 265 28 pmappl 200 771 0 754 1 0 1 1 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 365 0 106 8 0 8 8 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(ffff800000a36d00,ffff80001d816640,ffff80001d816598,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd80539ad100,fffffd805e567af0,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd805e567af0,9,fffffd80539ad100,0,0,ffff80001d742d60) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd805e567af0,0,ffff80001d816830,0,0,82) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d742d60,4,ffff80001d816910,2,ffff80001d8169f0) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d742d60,ffff80001d8169a8,ffff80001d8169f0) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001d816a70) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x4a158071a60, 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(ffff800000a36d00,ffff80001d816640,ffff80001d816598,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd80539ad100,fffffd805e567af0,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd805e567af0,9,fffffd80539ad100,0,0,ffff80001d742d60) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd805e567af0,0,ffff80001d816830,0,0,82) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d742d60,4,ffff80001d816910,2,ffff80001d8169f0) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d742d60,ffff80001d8169a8,ffff80001d8169f0) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001d816a70) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x4a158071a60, count: -11