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 *166926 18353 0 0 0x4000000 0 syz-executor.1 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff821df0ca) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff822359ae,ffffffff821f2154,3ab,ffffffff821bd9d3) at __assert+0x2b sys/kern/subr_prf.c:154 rtm_output(ffff800000a17100,ffff80001e842020,ffff80001e841f78,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd805aa3ba00,fffffd8065a407d0,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd8065a407d0,9,fffffd805aa3ba00,0,0,ffff80001d773770) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd8065a407d0,0,ffff80001e842210,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d773770,3,ffff80001e8422f0,0,ffff80001e8423d0) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d773770,ffff80001e842388,ffff80001e8423d0) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001e842450) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x4ddfff584e0, 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(ffffffff821df0ca) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff822359ae,ffffffff821f2154,3ab,ffffffff821bd9d3) at __assert+0x2b sys/kern/subr_prf.c:154 rtm_output(ffff800000a17100,ffff80001e842020,ffff80001e841f78,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd805aa3ba00,fffffd8065a407d0,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd8065a407d0,9,fffffd805aa3ba00,0,0,ffff80001d773770) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd8065a407d0,0,ffff80001e842210,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d773770,3,ffff80001e8422f0,0,ffff80001e8423d0) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d773770,ffff80001e842388,ffff80001e8423d0) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001e842450) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x4ddfff584e0, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001e841df0 rbx 0xffff80001e841ea0 rdx 0x2 rcx 0 rax 0x1 r8 0xffffffff81638c7f kprintf+0x15f r9 0x1 r10 0x2 r11 0xda8bf3f91f412863 r12 0x3000000008 r13 0xffff80001e841e00 r14 0x100 r15 0x1 rip 0xffffffff81c224d8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001e841de0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=166926 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=77, nice=20 forw=0xffffffffffffffff, list=0xffff80001d774130,0xffffffff8259b170 process=0xffff80001e8be030 user=0xffff80001e83d000, vmspace=0xfffffd8058d1e448 estcpu=27, cpticks=0, pctcpu=0.1 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 18353 268992 14807 0 2 0 syz-executor.1 *18353 166926 14807 0 7 0x4000000 syz-executor.1 14807 245934 65640 0 2 0x482 syz-executor.1 92221 22245 0 0 3 0x14200 bored sosplice 78158 48174 0 0 3 0x14200 acct acct 36431 80973 0 0 3 0x14280 nfsidl nfsio 86764 242119 0 0 3 0x14280 nfsidl nfsio 18588 278634 0 0 3 0x14280 nfsidl nfsio 11122 8461 0 0 3 0x14280 nfsidl nfsio 42630 101888 0 0 3 0x14280 nfsidl nfsio 26871 339456 0 0 3 0x14280 nfsidl nfsio 87875 285859 0 0 3 0x14280 nfsidl nfsio 42992 471495 0 0 3 0x14280 nfsidl nfsio 34125 181572 0 0 3 0x14280 nfsidl nfsio 48370 291600 0 0 3 0x14280 nfsidl nfsio 99010 200603 0 0 3 0x14280 nfsidl nfsio 35892 171954 0 0 3 0x14280 nfsidl nfsio 63962 352877 0 0 3 0x14280 nfsidl nfsio 80069 306573 0 0 3 0x14280 nfsidl nfsio 82308 247135 0 0 3 0x14280 nfsidl nfsio 85910 91568 0 0 3 0x14280 nfsidl nfsio 41419 48690 0 0 3 0x14280 nfsidl nfsio 82853 286409 0 0 3 0x14280 nfsidl nfsio 23049 387889 0 0 3 0x14280 nfsidl nfsio 48008 232031 0 0 3 0x14280 nfsidl nfsio 88177 402681 65640 0 3 0x82 nanosleep syz-executor.0 65640 280323 63346 0 3 0x82 thrsleep syz-fuzzer 65640 5557 63346 0 2 0x4000482 syz-fuzzer 65640 138470 63346 0 3 0x4000082 thrsleep syz-fuzzer 65640 127688 63346 0 3 0x4000082 thrsleep syz-fuzzer 65640 58263 63346 0 3 0x4000082 thrsleep syz-fuzzer 65640 62553 63346 0 3 0x4000082 kqread syz-fuzzer 65640 110123 63346 0 3 0x4000082 thrsleep syz-fuzzer 65640 128293 63346 0 3 0x4000082 thrsleep syz-fuzzer 63346 199692 44638 0 3 0x10008a pause ksh 44638 298932 36660 0 3 0x92 select sshd 67709 372479 1 0 3 0x100083 ttyin getty 36660 498144 1 0 3 0x80 select sshd 88203 125680 1118 73 3 0x100090 kqread syslogd 1118 48599 1 0 3 0x100082 netio syslogd 69369 229910 1 77 3 0x100090 poll dhclient 89856 78795 1 0 3 0x80 poll dhclient 63373 444722 0 0 3 0x14200 bored smr 64692 376351 0 0 2 0x14200 zerothread 98819 39295 0 0 3 0x14200 aiodoned aiodoned 13019 53684 0 0 2 0x14200 update 63329 319073 0 0 3 0x14200 cleaner cleaner 50797 101464 0 0 3 0x14200 reaper reaper 37163 329478 0 0 3 0x14200 pgdaemon pagedaemon 68816 450789 0 0 3 0x14200 bored crynlk 92524 27445 0 0 3 0x14200 bored crypto 80127 470359 0 0 3 0x40014200 acpi0 acpi0 50398 240142 0 0 3 0x14200 bored softnet 73797 317780 0 0 3 0x14200 bored systqmp 10590 342355 0 0 3 0x14200 bored systq 85344 199283 0 0 3 0x40014200 bored softclock 93671 311008 0 0 3 0x40014200 idle0 1 156676 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 6669K 6917K 78643K 13089 0 pcb 13 8K 8K 78643K 431 0 rtable 94 7K 9K 78643K 1180 0 ifaddr 86 17K 18K 78643K 220 0 counters 22 16K 16K 78643K 35 0 ioctlops 0 0K 4K 78643K 132 0 iov 0 0K 32K 78643K 88 0 mount 1 1K 1K 78643K 1 0 vnodes 1216 76K 77K 78643K 1885 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 1K 78643K 114 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1809 195K 288K 78643K 12938 0 file desc 6 17K 25K 78643K 800 0 sigio 0 0K 0K 78643K 11 0 proc 52 38K 63K 78643K 463 0 subproc 32 2K 2K 78643K 53 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 61 0 in_multi 71 3K 4K 78643K 173 0 ether_multi 1 0K 0K 78643K 24 0 mrt 0 0K 0K 78643K 379 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 247 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 141 88K 90K 78643K 3132 0 UVM aobj 21 2K 2K 78643K 26 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 108 0 NDP 12 0K 0K 78643K 36 0 temp 109 3040K 3105K 78643K 40382 0 kqueue 3 4K 12K 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 8 0 2 1 0 1 1 0 8 0 rtpcb 80 46 0 43 1 0 1 1 0 8 0 rtentry 112 292 0 266 2 0 2 2 0 8 0 unpcb 120 243 0 235 1 0 1 1 0 8 0 syncache 264 10 0 10 4 4 0 1 0 8 0 tcpqe 32 71 0 71 2 2 0 1 0 8 0 tcpcb 544 530 0 526 2 1 1 2 0 8 0 ipq 40 1 0 1 1 1 0 1 0 8 0 ipqe 40 45 0 45 1 1 0 1 0 8 0 inpcb 280 1210 0 1203 8 7 1 2 0 8 0 rttmr 72 90 0 90 2 2 0 1 0 8 0 nd6 48 16 0 15 1 0 1 1 0 8 0 ppxss 1128 2 0 2 1 0 1 1 0 8 1 pfstscr 40 4 0 2 1 0 1 1 0 8 0 pfrktable 1344 89 0 81 3 1 2 2 0 8 1 pftag 88 9 0 6 2 1 1 1 0 8 0 pfstitem 24 4 0 0 1 0 1 1 0 8 0 pfstkey 112 6 0 2 1 0 1 1 0 8 0 pfstate 328 3 0 1 1 0 1 1 0 8 0 pfrule 1360 32 0 14 2 0 2 2 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 3630 0 3533 17 7 10 14 0 8 0 art_table 32 3632 0 3533 2 0 2 2 0 8 0 art_node 16 291 0 269 1 0 1 1 0 8 0 sysvmsgpl 40 6 0 6 3 3 0 1 0 8 0 semupl 112 6 0 6 1 1 0 1 0 8 0 semapl 112 110 0 100 1 0 1 1 0 8 0 shmpl 112 24 0 6 2 1 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 2398 0 1007 88 0 88 88 0 8 0 ffsino 240 2398 0 1007 83 0 83 83 0 8 0 nchpl 144 3628 0 2038 60 0 60 60 0 8 0 uvmvnodes 72 3014 0 0 55 0 55 55 0 8 0 vnodes 208 3014 0 0 159 0 159 159 0 8 0 namei 1024 10287 0 10287 3 2 1 1 0 8 1 vcpupl 1984 9 0 0 2 0 2 2 0 8 0 vmpool 528 12 0 3 1 0 1 1 0 8 0 pfiaddrpl 120 31 0 27 1 0 1 1 0 8 0 scxspl 192 10424 0 10424 2 1 1 1 0 8 1 plimitpl 152 49 0 42 1 0 1 1 0 8 0 sigapl 424 1005 0 954 6 0 6 6 0 8 0 futexpl 56 16833 0 16833 3 2 1 1 0 8 1 knotepl 112 116 0 97 1 0 1 1 0 8 0 kqueuepl 144 100 0 89 1 0 1 1 0 8 0 pipelkpl 16 667 0 657 1 0 1 1 0 8 0 pipepl 120 1334 0 1315 2 0 2 2 0 8 1 fdescpl 432 969 0 954 2 0 2 2 0 8 0 filepl 120 6417 0 6312 4 0 4 4 0 8 0 lockfpl 104 136 0 135 1 0 1 1 0 8 0 lockfspl 48 48 0 47 1 0 1 1 0 8 0 sessionpl 112 18 0 8 1 0 1 1 0 8 0 pgrppl 48 22 0 12 1 0 1 1 0 8 0 ucredpl 96 534 0 527 1 0 1 1 0 8 0 zombiepl 144 955 0 954 1 0 1 1 0 8 0 processpl 920 1005 0 954 7 0 7 7 0 8 0 procpl 624 2372 0 2313 10 4 6 6 0 8 1 sosppl 128 11 0 11 3 3 0 1 0 8 0 sockpl 400 1501 0 1483 7 4 3 5 0 8 1 mcl64k 65536 303 0 303 38 37 1 33 0 8 1 mcl16k 16384 5 0 5 4 3 1 1 0 8 1 mcl12k 12288 21 0 21 9 8 1 1 0 8 1 mcl9k 9216 4 0 4 4 4 0 1 0 8 0 mcl8k 8192 18 0 18 6 5 1 1 0 8 1 mcl4k 4096 66 0 66 5 4 1 1 0 8 1 mcl2k2 2112 2 0 2 2 2 0 1 0 8 0 mcl2k 2048 77821 0 77768 19 11 8 14 0 8 0 mtagpl 80 324 0 150 5 1 4 4 0 8 0 mbufpl 256 129943 0 129511 45 13 32 39 0 8 0 bufpl 280 4861 0 136 338 0 338 338 0 8 0 anonpl 16 109585 0 94175 95 21 74 80 0 107 1 amapchunkpl 152 5100 0 4953 18 4 14 14 0 158 6 amappl16 192 4661 0 3672 78 25 53 62 0 8 3 amappl15 184 1 0 0 1 0 1 1 0 8 0 amappl14 176 274 0 268 1 0 1 1 0 8 0 amappl13 168 33 0 30 1 0 1 1 0 8 0 amappl12 160 386 0 379 2 1 1 1 0 8 0 amappl11 152 55 0 45 1 0 1 1 0 8 0 amappl10 144 14 0 10 1 0 1 1 0 8 0 amappl9 136 748 0 744 1 0 1 1 0 8 0 amappl8 128 747 0 696 2 0 2 2 0 8 0 amappl7 120 114 0 101 1 0 1 1 0 8 0 amappl6 112 25 0 21 1 0 1 1 0 8 0 amappl5 104 800 0 787 1 0 1 1 0 8 0 amappl4 96 690 0 659 1 0 1 1 0 8 0 amappl3 88 367 0 362 1 0 1 1 0 8 0 amappl2 80 6888 0 6815 2 0 2 2 0 8 0 amappl1 72 28181 0 27751 23 13 10 17 0 8 0 amappl 80 2601 0 2553 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 25 0 5 1 0 1 1 0 8 0 uaddrrnd 24 981 0 957 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 981 0 957 1 0 1 1 0 8 0 vmmpekpl 168 12184 0 12148 2 0 2 2 0 8 0 vmmpepl 168 121095 0 118886 155 57 98 126 0 357 1 vmsppl 272 980 0 957 2 0 2 2 0 8 0 pdppl 4096 1968 0 1923 9 3 6 6 0 8 0 pvpl 32 299556 0 280984 231 48 183 192 0 265 13 pmappl 200 980 0 957 3 1 2 2 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 347 0 96 9 0 9 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(ffffffff821df0ca) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff822359ae,ffffffff821f2154,3ab,ffffffff821bd9d3) at __assert+0x2b sys/kern/subr_prf.c:154 rtm_output(ffff800000a17100,ffff80001e842020,ffff80001e841f78,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd805aa3ba00,fffffd8065a407d0,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd8065a407d0,9,fffffd805aa3ba00,0,0,ffff80001d773770) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd8065a407d0,0,ffff80001e842210,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d773770,3,ffff80001e8422f0,0,ffff80001e8423d0) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d773770,ffff80001e842388,ffff80001e8423d0) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001e842450) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x4ddfff584e0, 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(ffffffff821df0ca) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff822359ae,ffffffff821f2154,3ab,ffffffff821bd9d3) at __assert+0x2b sys/kern/subr_prf.c:154 rtm_output(ffff800000a17100,ffff80001e842020,ffff80001e841f78,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd805aa3ba00,fffffd8065a407d0,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd8065a407d0,9,fffffd805aa3ba00,0,0,ffff80001d773770) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd8065a407d0,0,ffff80001e842210,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d773770,3,ffff80001e8422f0,0,ffff80001e8423d0) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d773770,ffff80001e842388,ffff80001e8423d0) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001e842450) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x4ddfff584e0, count: -11