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 *321411 91737 0 0 0x4000000 0 syz-executor.0 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff823bfed5) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff8242b9af,ffffffff823d7cde,3ab,ffffffff82398c33) at __assert+0x2b sys/kern/subr_prf.c:154 rtm_output(ffff800000b1b300,ffff80001e843c00,ffff80001e843b58,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd8053a68100,fffffd805da71e18,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd805da71e18,9,fffffd8053a68100,0,0,ffff80001d709500) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd805da71e18,0,ffff80001e843df0,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d709500,5,ffff80001e843ed0,0,ffff80001e843fb0) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d709500,ffff80001e843f68,ffff80001e843fb0) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001e844030) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x8c61fd08ed0, 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(ffffffff823bfed5) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff8242b9af,ffffffff823d7cde,3ab,ffffffff82398c33) at __assert+0x2b sys/kern/subr_prf.c:154 rtm_output(ffff800000b1b300,ffff80001e843c00,ffff80001e843b58,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd8053a68100,fffffd805da71e18,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd805da71e18,9,fffffd8053a68100,0,0,ffff80001d709500) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd805da71e18,0,ffff80001e843df0,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d709500,5,ffff80001e843ed0,0,ffff80001e843fb0) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d709500,ffff80001e843f68,ffff80001e843fb0) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001e844030) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x8c61fd08ed0, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001e8439d0 rbx 0xffff80001e843a80 rdx 0x2 rcx 0 rax 0x1 r8 0xffffffff81102faf kprintf+0x15f r9 0x1 r10 0x2 r11 0xb49fd841cb0b1f2d r12 0x3000000008 r13 0xffff80001e8439e0 r14 0x100 r15 0x1 rip 0xffffffff81cde048 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001e8439c0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=321411 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=80, nice=20 forw=0xffffffffffffffff, list=0xffff80001d70ad60,0xffffffff8281a880 process=0xffff80001e96e030 user=0xffff80001e83f000, vmspace=0xfffffd8068588668 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 91737 241391 59127 0 2 0 syz-executor.0 *91737 321411 59127 0 7 0x4000000 syz-executor.0 59127 392156 97490 0 3 0x82 nanosleep syz-executor.0 79380 205069 0 0 3 0x14200 acct acct 38613 428512 97490 0 3 0x82 piperd syz-executor.1 61745 226639 0 0 3 0x14280 nfsidl nfsio 43554 421221 0 0 3 0x14280 nfsidl nfsio 85069 164288 0 0 3 0x14280 nfsidl nfsio 7680 396360 0 0 3 0x14280 nfsidl nfsio 83873 180921 0 0 3 0x14280 nfsidl nfsio 3386 29704 0 0 3 0x14280 nfsidl nfsio 58686 286009 0 0 3 0x14280 nfsidl nfsio 64412 424142 0 0 3 0x14280 nfsidl nfsio 35989 290575 0 0 3 0x14280 nfsidl nfsio 81512 519996 0 0 3 0x14280 nfsidl nfsio 84854 424911 0 0 3 0x14280 nfsidl nfsio 30001 29826 0 0 3 0x14280 nfsidl nfsio 64399 446236 0 0 3 0x14280 nfsidl nfsio 5892 109065 0 0 3 0x14280 nfsidl nfsio 59321 290306 0 0 3 0x14280 nfsidl nfsio 34701 60846 0 0 3 0x14280 nfsidl nfsio 32603 420149 0 0 3 0x14280 nfsidl nfsio 56524 152404 0 0 3 0x14280 nfsidl nfsio 84294 406113 0 0 3 0x14280 nfsidl nfsio 41894 223519 0 0 3 0x14280 nfsidl nfsio 66484 133905 0 0 3 0x14200 bored sosplice 77941 274954 1 0 3 0x100083 ttyin getty 97490 472803 58364 0 3 0x82 thrsleep syz-fuzzer 97490 215831 58364 0 3 0x4000082 nanosleep syz-fuzzer 97490 350186 58364 0 3 0x4000082 thrsleep syz-fuzzer 97490 275562 58364 0 3 0x4000082 thrsleep syz-fuzzer 97490 111375 58364 0 3 0x4000082 thrsleep syz-fuzzer 97490 69862 58364 0 3 0x4000082 thrsleep syz-fuzzer 97490 435175 58364 0 3 0x4000082 thrsleep syz-fuzzer 97490 266488 58364 0 2 0x4000002 syz-fuzzer 58364 406768 53660 0 3 0x10008a pause ksh 53660 386608 690 0 3 0x92 select sshd 690 164561 1 0 3 0x80 select sshd 13724 387081 89072 73 3 0x100090 kqread syslogd 89072 189831 1 0 3 0x100082 netio syslogd 15413 167561 1 77 3 0x100090 poll dhclient 69546 357638 1 0 3 0x80 poll dhclient 95893 380929 0 0 3 0x14200 bored smr 94803 66206 0 0 2 0x14200 zerothread 67029 348971 0 0 3 0x14200 aiodoned aiodoned 12821 368843 0 0 3 0x14200 syncer update 75193 400151 0 0 3 0x14200 cleaner cleaner 89431 97481 0 0 3 0x14200 reaper reaper 15840 181793 0 0 3 0x14200 pgdaemon pagedaemon 81558 504184 0 0 3 0x14200 bored crynlk 56166 341896 0 0 3 0x14200 bored crypto 8955 409455 0 0 3 0x40014200 acpi0 acpi0 38795 134163 0 0 3 0x14200 bored softnet 59339 116658 0 0 3 0x14200 bored systqmp 79265 163012 0 0 3 0x14200 bored systq 9032 292422 0 0 3 0x40014200 bored softclock 42857 288011 0 0 3 0x40014200 idle0 1 455652 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 9535 6387K 6887K 78643K 11806 0 pcb 13 8K 8K 78643K 131 0 rtable 115 8K 9K 78643K 640 0 ifaddr 99 19K 19K 78643K 241 0 counters 21 16K 16K 78643K 41 0 ioctlops 0 0K 4K 78643K 93 0 iov 0 0K 16K 78643K 455 0 mount 1 1K 1K 78643K 1 0 vnodes 1222 77K 77K 78643K 1582 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 11 1K 1K 78643K 15 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1809 195K 288K 78643K 12938 0 file desc 5 13K 25K 78643K 576 0 sigio 0 0K 0K 78643K 6 0 proc 50 38K 55K 78643K 496 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 69 0 in_multi 65 3K 3K 78643K 155 0 ether_multi 1 0K 0K 78643K 22 0 mrt 0 0K 0K 78643K 5 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 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 137 40K 55K 78643K 2197 0 UVM aobj 31 2K 2K 78643K 34 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 109 0 NDP 16 0K 0K 78643K 45 0 temp 133 3857K 3921K 78643K 18256 0 kqueue 4 6K 14K 78643K 64 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 15 0 7 1 0 1 1 0 8 0 rtpcb 80 50 0 47 1 0 1 1 0 8 0 rtentry 112 89 0 51 2 0 2 2 0 8 0 unpcb 120 279 0 271 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 192 0 192 1 1 0 1 0 8 0 tcpcb 544 178 0 174 1 0 1 1 0 8 0 ipq 40 5 0 5 2 2 0 1 0 8 0 ipqe 40 54 0 54 2 2 0 1 0 8 0 inpcb 280 614 0 605 5 4 1 2 0 8 0 rttmr 72 1 0 1 1 1 0 1 0 8 0 nd6 48 14 0 8 1 0 1 1 0 8 0 pkpcb 40 8 0 8 4 3 1 1 0 8 1 ppxss 1128 4 0 4 3 3 0 1 0 8 0 pfstscr 40 4 0 1 1 0 1 1 0 8 0 pfrktable 1344 82 0 73 2 1 1 2 0 8 0 pftag 88 16 0 12 1 0 1 1 0 8 0 pfstitem 24 3 0 0 1 0 1 1 0 8 0 pfstkey 112 5 0 2 1 0 1 1 0 8 0 pfstate 328 3 0 1 1 0 1 1 0 8 0 pfrule 1360 36 0 16 3 1 2 2 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 450 0 279 18 7 11 14 0 8 0 art_table 32 452 0 279 2 0 2 2 0 8 0 art_node 16 88 0 56 1 0 1 1 0 8 0 sysvmsgpl 40 10 0 4 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 11 0 2 1 0 1 1 0 8 0 shmpl 112 32 0 3 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 2139 0 740 88 0 88 88 0 8 0 ffsino 240 2139 0 740 83 0 83 83 0 8 0 nchpl 144 3317 0 1728 60 0 60 60 0 8 0 uvmvnodes 72 2472 0 0 45 0 45 45 0 8 0 vnodes 208 2472 0 0 131 0 131 131 0 8 0 namei 1024 9067 0 9067 3 2 1 1 0 8 1 vcpupl 1984 2 0 0 1 0 1 1 0 8 0 vmpool 528 2 0 0 1 0 1 1 0 8 0 pfiaddrpl 120 40 0 28 1 0 1 1 0 8 0 scxspl 192 9567 0 9567 5 4 1 1 0 8 1 plimitpl 152 61 0 54 1 0 1 1 0 8 0 sigapl 424 779 0 729 6 0 6 6 0 8 0 futexpl 56 12131 0 12131 2 1 1 1 0 8 1 knotepl 112 172 0 153 1 0 1 1 0 8 0 kqueuepl 144 417 0 411 1 0 1 1 0 8 0 pipelkpl 16 179 0 168 1 0 1 1 0 8 0 pipepl 120 358 0 337 1 0 1 1 0 8 0 fdescpl 432 743 0 729 2 0 2 2 0 8 0 filepl 120 4888 0 4790 5 1 4 4 0 8 1 lockfpl 104 114 0 113 1 0 1 1 0 8 0 lockfspl 48 46 0 45 1 0 1 1 0 8 0 sessionpl 112 20 0 10 1 0 1 1 0 8 0 pgrppl 48 26 0 16 1 0 1 1 0 8 0 ucredpl 96 383 0 376 1 0 1 1 0 8 0 zombiepl 144 729 0 729 3 2 1 1 0 8 1 processpl 920 779 0 729 7 0 7 7 0 8 0 procpl 624 1404 0 1346 5 0 5 5 0 8 0 sosppl 128 15 0 15 2 2 0 1 0 8 0 sockpl 400 955 0 937 4 1 3 3 0 8 1 mcl64k 65536 41 0 40 1 0 1 1 0 8 0 mcl16k 16384 6 0 6 2 2 0 1 0 8 0 mcl12k 12288 12 0 12 3 2 1 1 0 8 1 mcl9k 9216 9 0 9 4 4 0 1 0 8 0 mcl8k 8192 21 0 21 4 4 0 1 0 8 0 mcl4k 4096 58 0 58 4 4 0 1 0 8 0 mcl2k2 2112 6 0 6 3 3 0 1 0 8 0 mcl2k 2048 77210 0 77159 22 15 7 18 0 8 0 mtagpl 80 49 0 27 2 1 1 1 0 8 0 mbufpl 256 126954 0 126348 51 11 40 40 0 8 0 bufpl 280 4733 0 128 329 0 329 329 0 8 0 anonpl 16 86364 0 71054 81 13 68 79 0 107 0 amapchunkpl 152 3430 0 3285 24 17 7 20 0 158 0 amappl16 192 3462 0 2545 57 9 48 53 0 8 2 amappl15 184 83 0 82 1 0 1 1 0 8 0 amappl14 176 368 0 361 1 0 1 1 0 8 0 amappl13 168 218 0 211 1 0 1 1 0 8 0 amappl12 160 13 0 12 1 0 1 1 0 8 0 amappl11 152 54 0 44 1 0 1 1 0 8 0 amappl10 144 10 0 7 1 0 1 1 0 8 0 amappl9 136 375 0 373 1 0 1 1 0 8 0 amappl8 128 389 0 341 2 0 2 2 0 8 0 amappl7 120 121 0 108 1 0 1 1 0 8 0 amappl6 112 28 0 20 1 0 1 1 0 8 0 amappl5 104 610 0 599 1 0 1 1 0 8 0 amappl4 96 558 0 525 1 0 1 1 0 8 0 amappl3 88 544 0 537 1 0 1 1 0 8 0 amappl2 80 5082 0 5017 2 0 2 2 0 8 0 amappl1 72 22441 0 22038 24 15 9 17 0 8 0 amappl 80 1637 0 1594 3 1 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 33 0 3 1 0 1 1 0 8 0 uaddrrnd 24 745 0 729 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 745 0 729 1 0 1 1 0 8 0 vmmpekpl 168 8560 0 8531 3 1 2 2 0 8 0 vmmpepl 168 94565 0 92562 170 74 96 124 0 357 8 vmsppl 272 744 0 729 2 0 2 2 0 8 0 pdppl 4096 1496 0 1460 6 1 5 6 0 8 0 pvpl 32 254334 0 235909 185 24 161 183 0 265 0 pmappl 200 744 0 729 1 0 1 1 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 304 0 50 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(ffffffff823bfed5) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff8242b9af,ffffffff823d7cde,3ab,ffffffff82398c33) at __assert+0x2b sys/kern/subr_prf.c:154 rtm_output(ffff800000b1b300,ffff80001e843c00,ffff80001e843b58,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd8053a68100,fffffd805da71e18,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd805da71e18,9,fffffd8053a68100,0,0,ffff80001d709500) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd805da71e18,0,ffff80001e843df0,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d709500,5,ffff80001e843ed0,0,ffff80001e843fb0) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d709500,ffff80001e843f68,ffff80001e843fb0) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001e844030) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x8c61fd08ed0, 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(ffffffff823bfed5) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff8242b9af,ffffffff823d7cde,3ab,ffffffff82398c33) at __assert+0x2b sys/kern/subr_prf.c:154 rtm_output(ffff800000b1b300,ffff80001e843c00,ffff80001e843b58,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd8053a68100,fffffd805da71e18,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd805da71e18,9,fffffd8053a68100,0,0,ffff80001d709500) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd805da71e18,0,ffff80001e843df0,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d709500,5,ffff80001e843ed0,0,ffff80001e843fb0) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d709500,ffff80001e843f68,ffff80001e843fb0) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001e844030) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x8c61fd08ed0, count: -11