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 *104930 76629 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(ffff800000afdf00,ffff80001f855aa0,ffff80001f8559f8,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd8057897200,fffffd806b73eaf0,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd806b73eaf0,9,fffffd8057897200,0,0,ffff80001d6f4880) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd806b73eaf0,0,ffff80001f855c90,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6f4880,3,ffff80001f855d70,0,ffff80001f855e50) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6f4880,ffff80001f855e08,ffff80001f855e50) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001f855ed0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x23fe1aca0b0, 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(ffff800000afdf00,ffff80001f855aa0,ffff80001f8559f8,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd8057897200,fffffd806b73eaf0,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd806b73eaf0,9,fffffd8057897200,0,0,ffff80001d6f4880) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd806b73eaf0,0,ffff80001f855c90,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6f4880,3,ffff80001f855d70,0,ffff80001f855e50) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6f4880,ffff80001f855e08,ffff80001f855e50) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001f855ed0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x23fe1aca0b0, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001f855870 rbx 0xffff80001f855920 rdx 0x2 rcx 0 rax 0x1 r8 0xffffffff8120980f kprintf+0x15f r9 0x1 r10 0x2 r11 0xe27a1a933ad068e8 r12 0x3000000008 r13 0xffff80001f855880 r14 0x100 r15 0x1 rip 0xffffffff81fbc738 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001f855860 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=104930 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=77, nice=20 forw=0xffffffffffffffff, list=0xffff80001d6f3020,0xffffffff8283fb58 process=0xffff80001e7d4030 user=0xffff80001f850000, vmspace=0xfffffd805c331bb8 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 76629 285408 82804 0 2 0 syz-executor.1 *76629 104930 82804 0 7 0x4000000 syz-executor.1 51713 1631 42825 0 2 0x2 syz-executor.0 309 185531 0 0 3 0x14280 nfsidl nfsio 22991 63246 0 0 3 0x14280 nfsidl nfsio 87417 13281 0 0 3 0x14280 nfsidl nfsio 12283 374880 0 0 3 0x14280 nfsidl nfsio 41117 108840 0 0 3 0x14280 nfsidl nfsio 91352 291256 0 0 3 0x14280 nfsidl nfsio 84896 376646 0 0 3 0x14280 nfsidl nfsio 76156 42327 0 0 3 0x14280 nfsidl nfsio 41822 287530 0 0 3 0x14280 nfsidl nfsio 69143 206582 0 0 3 0x14280 nfsidl nfsio 89998 278956 0 0 3 0x14280 nfsidl nfsio 76292 23981 0 0 3 0x14280 nfsidl nfsio 41624 148079 0 0 3 0x14280 nfsidl nfsio 34000 134860 0 0 3 0x14280 nfsidl nfsio 91301 268290 0 0 3 0x14280 nfsidl nfsio 81412 487799 0 0 3 0x14280 nfsidl nfsio 76334 374163 0 0 3 0x14280 nfsidl nfsio 43440 252954 0 0 3 0x14280 nfsidl nfsio 77038 195074 0 0 3 0x14280 nfsidl nfsio 26000 248397 0 0 3 0x14280 nfsidl nfsio 82804 364570 42825 0 2 0x482 syz-executor.1 44736 275661 0 0 3 0x14200 acct acct 60648 422547 0 0 3 0x14200 bored sosplice 42825 180363 46861 0 3 0x82 thrsleep syz-fuzzer 42825 381458 46861 0 3 0x4000082 nanosleep syz-fuzzer 42825 392795 46861 0 3 0x4000082 kqread syz-fuzzer 42825 17882 46861 0 3 0x4000082 thrsleep syz-fuzzer 42825 349307 46861 0 3 0x4000082 thrsleep syz-fuzzer 42825 234668 46861 0 3 0x4000082 thrsleep syz-fuzzer 42825 295541 46861 0 3 0x4000082 thrsleep syz-fuzzer 42825 183665 46861 0 3 0x4000082 thrsleep syz-fuzzer 46861 516304 37872 0 3 0x10008a pause ksh 37872 357163 14494 0 3 0x92 select sshd 98091 240847 1 0 3 0x100083 ttyin getty 14494 433328 1 0 3 0x80 select sshd 88122 290457 74112 73 3 0x100090 kqread syslogd 74112 276061 1 0 3 0x100082 netio syslogd 55473 3808 1 77 3 0x100090 poll dhclient 39975 93559 1 0 3 0x80 poll dhclient 49113 229043 0 0 3 0x14200 bored smr 70968 379027 0 0 2 0x14200 zerothread 28640 351904 0 0 3 0x14200 aiodoned aiodoned 46462 51734 0 0 3 0x14200 syncer update 60896 338981 0 0 3 0x14200 cleaner cleaner 17445 85574 0 0 3 0x14200 reaper reaper 73145 26567 0 0 3 0x14200 pgdaemon pagedaemon 42568 389746 0 0 3 0x14200 bored crynlk 39695 238110 0 0 3 0x14200 bored crypto 63043 243544 0 0 3 0x40014200 acpi0 acpi0 23323 22645 0 0 3 0x14200 bored softnet 58783 77032 0 0 3 0x14200 bored systqmp 18338 487066 0 0 3 0x14200 bored systq 47399 243249 0 0 3 0x40014200 bored softclock 36893 26873 0 0 3 0x40014200 idle0 1 39134 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 9495 6341K 6648K 78643K 10917 0 pcb 13 8K 8K 78643K 79 0 rtable 105 5K 7K 78643K 627 0 ifaddr 73 15K 15K 78643K 198 0 counters 21 16K 16K 78643K 28 0 ioctlops 0 0K 4K 78643K 71 0 iov 0 0K 20K 78643K 59 0 mount 1 1K 1K 78643K 1 0 vnodes 1220 77K 77K 78643K 1394 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 7 0 VM map 2 0K 0K 78643K 2 0 sem 10 1K 1K 78643K 13 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1809 195K 288K 78643K 12938 0 file desc 5 13K 25K 78643K 345 0 sigio 0 0K 0K 78643K 12 0 proc 49 38K 55K 78643K 463 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 20 0 in_multi 49 3K 3K 78643K 101 0 ether_multi 1 0K 0K 78643K 6 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 253 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 131 39K 40K 78643K 1676 0 UVM aobj 18 2K 2K 78643K 21 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 38 0 NDP 13 0K 0K 78643K 27 0 temp 92 3847K 3911K 78643K 33546 0 kqueue 3 4K 10K 78643K 22 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 4 1 0 1 1 0 8 0 rtpcb 80 36 0 33 1 0 1 1 0 8 0 rtentry 112 83 0 46 2 0 2 2 0 8 0 unpcb 120 193 0 185 1 0 1 1 0 8 0 syncache 264 14 0 14 2 1 1 1 0 8 1 tcpqe 32 49 0 49 2 2 0 1 0 8 0 tcpcb 544 128 0 124 1 0 1 1 0 8 0 ipq 40 3 0 2 1 0 1 1 0 8 0 ipqe 40 92 0 91 1 0 1 1 0 8 0 inpcb 280 911 0 904 2 0 2 2 0 8 1 nd6 48 14 0 8 1 0 1 1 0 8 0 pfstscr 40 3 0 2 1 0 1 1 0 8 0 pfrktable 1344 119 0 115 1 0 1 1 0 8 0 pftag 88 20 0 18 2 1 1 1 0 8 0 pfstitem 24 2 0 0 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 20 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 436 0 248 15 3 12 13 0 8 0 art_table 32 438 0 248 2 0 2 2 0 8 0 art_node 16 82 0 51 1 0 1 1 0 8 0 semupl 112 3 0 3 1 1 0 1 0 8 0 semapl 112 9 0 1 1 0 1 1 0 8 0 shmpl 112 19 0 3 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1841 0 446 88 0 88 88 0 8 0 ffsino 240 1841 0 446 83 0 83 83 0 8 0 nchpl 144 2486 0 899 60 0 60 60 0 8 0 uvmvnodes 72 1997 0 0 37 0 37 37 0 8 0 vnodes 208 1997 0 0 106 0 106 106 0 8 0 namei 1024 6641 0 6641 1 0 1 1 0 8 1 vcpupl 1984 2 0 0 1 0 1 1 0 8 0 vmpool 528 4 0 2 1 0 1 1 0 8 0 pfiaddrpl 120 38 0 36 2 1 1 1 0 8 0 scsiplug 64 1 0 1 1 0 1 1 0 8 1 scxspl 192 8424 0 8424 1 0 1 1 0 8 1 plimitpl 152 24 0 17 1 0 1 1 0 8 0 sigapl 424 547 0 497 6 0 6 6 0 8 0 futexpl 56 6648 0 6648 1 0 1 1 0 8 1 knotepl 112 110 0 91 1 0 1 1 0 8 0 kqueuepl 144 58 0 56 1 0 1 1 0 8 0 pipelkpl 16 122 0 112 1 0 1 1 0 8 0 pipepl 120 244 0 225 1 0 1 1 0 8 0 fdescpl 432 511 0 497 2 0 2 2 0 8 0 filepl 120 3283 0 3187 4 0 4 4 0 8 1 lockfpl 104 58 0 57 1 0 1 1 0 8 0 lockfspl 48 25 0 24 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 274 0 267 1 0 1 1 0 8 0 zombiepl 144 497 0 497 1 0 1 1 0 8 1 processpl 920 547 0 497 7 0 7 7 0 8 0 procpl 624 899 0 841 5 0 5 5 0 8 0 sosppl 128 11 0 11 1 0 1 1 0 8 1 sockpl 400 1145 0 1127 4 0 4 4 0 8 2 mcl64k 65536 544 0 544 65 15 50 65 0 8 50 mcl16k 16384 4 0 4 1 1 0 1 0 8 0 mcl12k 12288 9 0 9 2 1 1 1 0 8 1 mcl9k 9216 5 0 5 1 0 1 1 0 8 1 mcl8k 8192 9 0 9 2 1 1 1 0 8 1 mcl4k 4096 39 0 39 2 1 1 1 0 8 1 mcl2k2 2112 2 0 2 2 1 1 1 0 8 1 mcl2k 2048 75772 0 75726 16 9 7 13 0 8 0 mtagpl 80 23 0 13 2 1 1 1 0 8 0 mbufpl 256 123529 0 123434 62 43 19 53 0 8 11 bufpl 280 4016 0 132 278 0 278 278 0 8 0 anonpl 16 74967 0 62202 83 5 78 81 0 107 11 amapchunkpl 152 2213 0 2087 8 2 6 7 0 158 0 amappl16 192 2851 0 1956 57 2 55 57 0 8 6 amappl15 184 91 0 89 1 0 1 1 0 8 0 amappl14 176 22 0 18 1 0 1 1 0 8 0 amappl13 168 295 0 292 1 0 1 1 0 8 0 amappl12 160 13 0 10 1 0 1 1 0 8 0 amappl11 152 135 0 125 1 0 1 1 0 8 0 amappl10 144 79 0 74 1 0 1 1 0 8 0 amappl9 136 344 0 342 1 0 1 1 0 8 0 amappl8 128 374 0 331 2 0 2 2 0 8 0 amappl7 120 182 0 169 1 0 1 1 0 8 0 amappl6 112 32 0 21 1 0 1 1 0 8 0 amappl5 104 372 0 361 1 0 1 1 0 8 0 amappl4 96 580 0 552 1 0 1 1 0 8 0 amappl3 88 243 0 238 1 0 1 1 0 8 0 amappl2 80 3214 0 3152 2 0 2 2 0 8 0 amappl1 72 18994 0 18583 23 14 9 17 0 8 0 amappl 80 1128 0 1087 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 20 0 3 1 0 1 1 0 8 0 uaddrrnd 24 515 0 499 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 515 0 499 1 0 1 1 0 8 0 vmmpekpl 168 7291 0 7258 2 0 2 2 0 8 0 vmmpepl 168 71545 0 69572 140 18 122 122 0 357 33 vmsppl 272 514 0 499 2 0 2 2 0 8 0 pdppl 4096 1036 0 1000 7 2 5 6 0 8 0 pvpl 32 228490 0 212628 190 4 186 190 0 265 29 pmappl 200 514 0 499 1 0 1 1 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 362 0 77 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(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(ffff800000afdf00,ffff80001f855aa0,ffff80001f8559f8,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd8057897200,fffffd806b73eaf0,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd806b73eaf0,9,fffffd8057897200,0,0,ffff80001d6f4880) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd806b73eaf0,0,ffff80001f855c90,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6f4880,3,ffff80001f855d70,0,ffff80001f855e50) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6f4880,ffff80001f855e08,ffff80001f855e50) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001f855ed0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x23fe1aca0b0, 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(ffff800000afdf00,ffff80001f855aa0,ffff80001f8559f8,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd8057897200,fffffd806b73eaf0,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd806b73eaf0,9,fffffd8057897200,0,0,ffff80001d6f4880) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd806b73eaf0,0,ffff80001f855c90,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6f4880,3,ffff80001f855d70,0,ffff80001f855e50) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6f4880,ffff80001f855e08,ffff80001f855e50) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001f855ed0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x23fe1aca0b0, count: -11