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 *310154 72944 0 0 0x4000000 0 syz-executor.1 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff823c20ed) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff8242d39c,ffffffff823dae3b,3ab,ffffffff8239a6b1) at __assert+0x2b sys/kern/subr_prf.c:154 rtm_output(ffff800000b08f00,ffff80001e79ded0,ffff80001e79de28,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd8058df5d00,fffffd8053c94c90,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd8053c94c90,9,fffffd8058df5d00,0,0,ffff80001d6f3290) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd8053c94c90,0,ffff80001e79e0c0,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6f3290,3,ffff80001e79e1a0,0,ffff80001e79e280) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6f3290,ffff80001e79e238,ffff80001e79e280) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001e79e300) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xb08efba3890, 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(ffffffff823c20ed) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff8242d39c,ffffffff823dae3b,3ab,ffffffff8239a6b1) at __assert+0x2b sys/kern/subr_prf.c:154 rtm_output(ffff800000b08f00,ffff80001e79ded0,ffff80001e79de28,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd8058df5d00,fffffd8053c94c90,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd8053c94c90,9,fffffd8058df5d00,0,0,ffff80001d6f3290) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd8053c94c90,0,ffff80001e79e0c0,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6f3290,3,ffff80001e79e1a0,0,ffff80001e79e280) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6f3290,ffff80001e79e238,ffff80001e79e280) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001e79e300) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xb08efba3890, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001e79dca0 rbx 0xffff80001e79dd50 rdx 0x2 rcx 0 rax 0x1 r8 0xffffffff8120980f kprintf+0x15f r9 0x1 r10 0x2 r11 0x4677f426844a03f3 r12 0x3000000008 r13 0xffff80001e79dcb0 r14 0x100 r15 0x1 rip 0xffffffff81fbc738 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001e79dc90 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=310154 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=81, nice=20 forw=0xffffffffffffffff, list=0xffff80001d6f3770,0xffffffff8283fb58 process=0xffff8000209a0e90 user=0xffff80001e799000, vmspace=0xfffffd8053b8f890 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 72944 123866 24281 0 2 0 syz-executor.1 *72944 310154 24281 0 7 0x4000000 syz-executor.1 11074 256365 0 0 3 0x14280 nfsidl nfsio 48888 523455 0 0 3 0x14280 nfsidl nfsio 44840 438336 0 0 3 0x14280 nfsidl nfsio 88869 447286 0 0 3 0x14280 nfsidl nfsio 32774 328495 0 0 3 0x14280 nfsidl nfsio 65758 345551 0 0 3 0x14280 nfsidl nfsio 9971 259920 0 0 3 0x14280 nfsidl nfsio 97936 412004 0 0 3 0x14280 nfsidl nfsio 55854 311362 0 0 3 0x14280 nfsidl nfsio 35479 308008 0 0 3 0x14280 nfsidl nfsio 23337 421264 0 0 3 0x14280 nfsidl nfsio 52926 116156 0 0 3 0x14280 nfsidl nfsio 80658 291315 0 0 3 0x14280 nfsidl nfsio 72260 135216 0 0 3 0x14280 nfsidl nfsio 98849 32971 0 0 3 0x14280 nfsidl nfsio 82470 337616 0 0 3 0x14280 nfsidl nfsio 12000 33233 0 0 3 0x14280 nfsidl nfsio 35085 513539 0 0 3 0x14280 nfsidl nfsio 42312 3752 0 0 3 0x14280 nfsidl nfsio 50512 419156 0 0 3 0x14280 nfsidl nfsio 24281 221009 71463 0 3 0x82 nanosleep syz-executor.1 25457 191936 1 0 3 0x100083 ttyin getty 34915 512263 0 0 3 0x14200 acct acct 54046 127391 0 0 3 0x14200 bored sosplice 73702 164093 71463 0 3 0x82 piperd syz-executor.0 71463 284898 92842 0 3 0x82 thrsleep syz-fuzzer 71463 423030 92842 0 3 0x4000082 nanosleep syz-fuzzer 71463 381953 92842 0 3 0x4000082 thrsleep syz-fuzzer 71463 290063 92842 0 3 0x4000082 thrsleep syz-fuzzer 71463 26499 92842 0 3 0x4000082 thrsleep syz-fuzzer 71463 499234 92842 0 2 0x4000002 syz-fuzzer 71463 300330 92842 0 3 0x4000082 thrsleep syz-fuzzer 92842 516844 69530 0 3 0x10008a pause ksh 69530 490216 50286 0 3 0x92 select sshd 50286 124074 1 0 3 0x80 select sshd 12277 304785 92370 73 3 0x100090 kqread syslogd 92370 329341 1 0 3 0x100082 netio syslogd 13361 243471 1 77 3 0x100090 poll dhclient 8252 376383 1 0 3 0x80 poll dhclient 18571 392072 0 0 3 0x14200 bored smr 38216 145323 0 0 2 0x14200 zerothread 33978 509573 0 0 3 0x14200 aiodoned aiodoned 9232 429841 0 0 3 0x14200 syncer update 30078 391226 0 0 3 0x14200 cleaner cleaner 24272 379777 0 0 3 0x14200 reaper reaper 26453 253863 0 0 3 0x14200 pgdaemon pagedaemon 66933 130952 0 0 3 0x14200 bored crynlk 61877 393692 0 0 3 0x14200 bored crypto 29891 256384 0 0 3 0x40014200 acpi0 acpi0 58001 154327 0 0 3 0x14200 bored softnet 97676 135151 0 0 3 0x14200 bored systqmp 49864 499483 0 0 3 0x14200 bored systq 43735 464520 0 0 3 0x40014200 bored softclock 44089 366656 0 0 3 0x40014200 idle0 1 479632 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 9533 6367K 6781K 78643K 12194 0 pcb 13 8K 8K 78643K 199 0 rtable 91 8K 11K 78643K 911 0 ifaddr 94 18K 19K 78643K 311 0 counters 20 16K 16K 78643K 37 0 ioctlops 0 0K 4K 78643K 182 0 iov 0 0K 16K 78643K 183 0 mount 1 1K 1K 78643K 1 0 vnodes 1224 77K 77K 78643K 1808 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 10 0 VM map 2 0K 0K 78643K 2 0 sem 12 0K 0K 78643K 169 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1809 195K 288K 78643K 12938 0 file desc 5 13K 25K 78643K 1019 0 sigio 0 0K 0K 78643K 14 0 proc 51 38K 63K 78643K 566 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 82 0 in_multi 95 4K 4K 78643K 222 0 ether_multi 1 0K 0K 78643K 31 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 61 281K 281K 78643K 61 0 exec 0 0K 1K 78643K 315 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 153 137K 138K 78643K 3251 0 UVM aobj 47 4K 4K 78643K 47 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 184 0 NDP 15 0K 0K 78643K 45 0 temp 147 3864K 3928K 78643K 36377 0 kqueue 5 8K 14K 78643K 100 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 9 1 0 1 1 0 8 0 rtpcb 80 72 0 69 1 0 1 1 0 8 0 rtentry 112 93 0 70 2 0 2 2 0 8 0 unpcb 120 706 0 696 1 0 1 1 0 8 0 syncache 264 18 0 18 8 8 0 1 0 8 0 tcpqe 32 504 0 504 3 3 0 1 0 8 0 tcpcb 544 411 0 407 1 0 1 1 0 8 0 ipq 40 4 0 4 3 3 0 1 0 8 0 ipqe 40 94 0 94 3 3 0 1 0 8 0 inpcb 280 1125 0 1118 4 3 1 2 0 8 0 rttmr 72 1 0 1 1 1 0 1 0 8 0 ip6q 72 2 0 2 1 1 0 1 0 8 0 ip6af 40 6 0 6 1 1 0 1 0 8 0 nd6 48 17 0 14 3 2 1 1 0 8 0 pkpcb 40 8 0 8 2 2 0 1 0 8 0 ppxss 1128 3 0 3 3 3 0 1 0 8 0 pfstscr 40 4 0 0 1 0 1 1 0 8 0 pfosfp 40 3 0 0 1 0 1 1 0 8 0 pfosfpen 112 5 0 0 1 0 1 1 0 8 0 pfrktable 1344 205 0 193 7 6 1 2 0 8 0 pftag 88 32 0 24 1 0 1 1 0 8 0 pfstitem 24 8 0 0 1 0 1 1 0 8 0 pfstkey 112 8 0 0 1 0 1 1 0 8 0 pfstate 328 4 0 0 1 0 1 1 0 8 0 pfrule 1360 71 0 50 3 1 2 2 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 530 0 413 16 8 8 14 0 8 0 art_table 32 532 0 413 2 0 2 2 0 8 0 art_node 16 92 0 74 1 0 1 1 0 8 0 sysvmsgpl 40 42 0 36 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 161 0 151 1 0 1 1 0 8 0 shmpl 112 45 0 0 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 2857 0 1464 88 0 88 88 0 8 0 ffsino 240 2857 0 1464 83 0 83 83 0 8 0 nchpl 144 5087 0 3511 60 0 60 60 0 8 0 uvmvnodes 72 3317 0 0 61 0 61 61 0 8 0 vnodes 208 3317 0 0 175 0 175 175 0 8 0 namei 1024 14389 0 14389 5 4 1 1 0 8 1 vcpupl 1984 11 0 0 2 0 2 2 0 8 0 vmpool 528 14 0 3 2 1 1 1 0 8 0 pfiaddrpl 120 82 0 68 1 0 1 1 0 8 0 scxspl 192 13916 0 13916 8 7 1 1 0 8 1 plimitpl 152 93 0 86 1 0 1 1 0 8 0 sigapl 424 1222 0 1172 6 0 6 6 0 8 0 futexpl 56 21892 0 21892 4 3 1 1 0 8 1 knotepl 112 212 0 193 1 0 1 1 0 8 0 kqueuepl 144 204 0 196 1 0 1 1 0 8 0 pipelkpl 16 228 0 218 1 0 1 1 0 8 0 pipepl 120 456 0 437 1 0 1 1 0 8 0 fdescpl 432 1186 0 1172 2 0 2 2 0 8 0 filepl 120 8546 0 8450 6 2 4 4 0 8 1 lockfpl 104 276 0 275 1 0 1 1 0 8 0 lockfspl 48 100 0 99 1 0 1 1 0 8 0 sessionpl 112 20 0 10 1 0 1 1 0 8 0 pgrppl 48 32 0 22 1 0 1 1 0 8 0 ucredpl 96 760 0 753 1 0 1 1 0 8 0 zombiepl 144 1172 0 1172 4 3 1 1 0 8 1 processpl 920 1222 0 1172 7 0 7 7 0 8 0 procpl 624 2405 0 2348 5 0 5 5 0 8 0 sosppl 128 23 0 23 6 5 1 1 0 8 1 sockpl 400 1918 0 1898 9 6 3 4 0 8 0 mcl64k 65536 96 0 96 14 14 0 1 0 8 0 mcl16k 16384 6 0 6 4 4 0 1 0 8 0 mcl12k 12288 22 0 22 10 9 1 1 0 8 1 mcl9k 9216 9 0 9 7 6 1 1 0 8 1 mcl8k 8192 33 0 33 14 13 1 1 0 8 1 mcl4k 4096 99 0 99 14 13 1 1 0 8 1 mcl2k2 2112 7 0 7 3 3 0 1 0 8 0 mcl2k 2048 73977 0 73915 28 19 9 18 0 8 0 mtagpl 80 143 0 114 5 4 1 2 0 8 0 mbufpl 256 125822 0 125674 37 27 10 18 0 8 0 bufpl 280 5723 0 371 383 0 383 383 0 8 0 anonpl 16 128935 0 112719 108 40 68 82 0 107 1 amapchunkpl 152 6692 0 6533 43 36 7 20 0 158 0 amappl16 192 5735 0 4817 87 41 46 56 0 8 0 amappl15 184 575 0 574 1 0 1 1 0 8 0 amappl14 176 22 0 18 1 0 1 1 0 8 0 amappl13 168 545 0 538 1 0 1 1 0 8 0 amappl12 160 5 0 4 1 0 1 1 0 8 0 amappl11 152 221 0 212 1 0 1 1 0 8 0 amappl10 144 145 0 140 1 0 1 1 0 8 0 amappl9 136 355 0 352 1 0 1 1 0 8 0 amappl8 128 391 0 350 2 0 2 2 0 8 0 amappl7 120 250 0 237 1 0 1 1 0 8 0 amappl6 112 199 0 190 1 0 1 1 0 8 0 amappl5 104 741 0 728 1 0 1 1 0 8 0 amappl4 96 881 0 853 1 0 1 1 0 8 0 amappl3 88 396 0 389 1 0 1 1 0 8 0 amappl2 80 8977 0 8910 2 0 2 2 0 8 0 amappl1 72 30026 0 29609 23 13 10 17 0 8 0 amappl 80 2665 0 2614 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 46 0 0 1 0 1 1 0 8 0 uaddrrnd 24 1200 0 1175 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1200 0 1175 1 0 1 1 0 8 0 vmmpekpl 168 9615 0 9579 2 0 2 2 0 8 0 vmmpepl 168 145318 0 143281 203 113 90 124 0 357 0 vmsppl 272 1199 0 1175 3 1 2 2 0 8 0 pdppl 4096 2406 0 2361 8 2 6 6 0 8 0 pvpl 32 359982 0 340665 265 102 163 194 0 265 4 pmappl 200 1199 0 1175 2 0 2 2 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 339 0 114 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(ffffffff823c20ed) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff8242d39c,ffffffff823dae3b,3ab,ffffffff8239a6b1) at __assert+0x2b sys/kern/subr_prf.c:154 rtm_output(ffff800000b08f00,ffff80001e79ded0,ffff80001e79de28,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd8058df5d00,fffffd8053c94c90,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd8053c94c90,9,fffffd8058df5d00,0,0,ffff80001d6f3290) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd8053c94c90,0,ffff80001e79e0c0,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6f3290,3,ffff80001e79e1a0,0,ffff80001e79e280) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6f3290,ffff80001e79e238,ffff80001e79e280) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001e79e300) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xb08efba3890, 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(ffffffff823c20ed) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff8242d39c,ffffffff823dae3b,3ab,ffffffff8239a6b1) at __assert+0x2b sys/kern/subr_prf.c:154 rtm_output(ffff800000b08f00,ffff80001e79ded0,ffff80001e79de28,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd8058df5d00,fffffd8053c94c90,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd8053c94c90,9,fffffd8058df5d00,0,0,ffff80001d6f3290) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd8053c94c90,0,ffff80001e79e0c0,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6f3290,3,ffff80001e79e1a0,0,ffff80001e79e280) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6f3290,ffff80001e79e238,ffff80001e79e280) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001e79e300) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xb08efba3890, count: -11