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 * 76191 47766 0 0 0x4000000 0 syz-executor.1 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(ffff800000a3e400,ffff80001d804640,ffff80001d804598,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd805bce2800,fffffd805e55a960,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd805e55a960,9,fffffd805bce2800,0,0,ffff80001d7739e0) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd805e55a960,0,ffff80001d804830,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d7739e0,3,ffff80001d804910,0,ffff80001d8049f0) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d7739e0,ffff80001d8049a8,ffff80001d8049f0) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001d804a70) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x117fbb636c0, 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(ffff800000a3e400,ffff80001d804640,ffff80001d804598,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd805bce2800,fffffd805e55a960,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd805e55a960,9,fffffd805bce2800,0,0,ffff80001d7739e0) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd805e55a960,0,ffff80001d804830,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d7739e0,3,ffff80001d804910,0,ffff80001d8049f0) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d7739e0,ffff80001d8049a8,ffff80001d8049f0) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001d804a70) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x117fbb636c0, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001d804410 rbx 0xffff80001d8044c0 rdx 0x2 rcx 0 rax 0x1 r8 0xffffffff813a55ef kprintf+0x15f r9 0x1 r10 0x2 r11 0x3a992074015e5e3e r12 0x3000000008 r13 0xffff80001d804420 r14 0x100 r15 0x1 rip 0xffffffff812bfa38 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001d804400 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=76191 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=81, nice=20 forw=0xffffffffffffffff, list=0xffff80001d774130,0xffffffff825b67d0 process=0xffff800020c1a3c8 user=0xffff80001d7ff000, vmspace=0xfffffd8068931228 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 47766 502904 29584 0 2 0 syz-executor.1 *47766 76191 29584 0 7 0x4000000 syz-executor.1 72350 209033 16548 0 2 0x2 syz-executor.0 29584 490247 16548 0 2 0x482 syz-executor.1 56057 375829 0 0 3 0x14200 bored sosplice 61254 263773 0 0 3 0x14280 nfsidl nfsio 81443 442306 0 0 3 0x14280 nfsidl nfsio 10112 432970 0 0 3 0x14280 nfsidl nfsio 33047 266738 0 0 3 0x14280 nfsidl nfsio 32007 265377 0 0 3 0x14280 nfsidl nfsio 20335 428746 0 0 3 0x14280 nfsidl nfsio 8326 517774 0 0 3 0x14280 nfsidl nfsio 30751 222275 0 0 3 0x14280 nfsidl nfsio 36545 122651 0 0 3 0x14280 nfsidl nfsio 69886 56544 0 0 3 0x14280 nfsidl nfsio 70078 317936 0 0 3 0x14280 nfsidl nfsio 94031 363902 0 0 3 0x14280 nfsidl nfsio 31382 4393 0 0 3 0x14280 nfsidl nfsio 1257 213330 0 0 3 0x14280 nfsidl nfsio 86462 178179 0 0 3 0x14280 nfsidl nfsio 22838 289276 0 0 3 0x14280 nfsidl nfsio 68617 51302 0 0 3 0x14280 nfsidl nfsio 82269 17118 0 0 3 0x14280 nfsidl nfsio 70060 206132 0 0 3 0x14280 nfsidl nfsio 38579 336690 0 0 3 0x14280 nfsidl nfsio 16548 515899 80779 0 3 0x82 kqread syz-fuzzer 16548 72682 80779 0 3 0x4000082 nanosleep syz-fuzzer 16548 207137 80779 0 3 0x4000082 thrsleep syz-fuzzer 16548 95541 80779 0 3 0x4000082 thrsleep syz-fuzzer 16548 258270 80779 0 3 0x4000082 thrsleep syz-fuzzer 16548 133862 80779 0 3 0x4000082 thrsleep syz-fuzzer 16548 107703 80779 0 3 0x4000082 thrsleep syz-fuzzer 16548 31817 80779 0 3 0x4000082 thrsleep syz-fuzzer 80779 239664 62990 0 3 0x10008a pause ksh 62990 124343 65296 0 3 0x92 select sshd 628 86654 1 0 3 0x100083 ttyin getty 65296 467493 1 0 3 0x80 select sshd 89074 517699 60925 73 3 0x100090 kqread syslogd 60925 204403 1 0 3 0x100082 netio syslogd 21826 491686 1 77 3 0x100090 poll dhclient 8895 32762 1 0 3 0x80 poll dhclient 80771 61065 0 0 3 0x14200 bored smr 93824 251401 0 0 2 0x14200 zerothread 63596 478815 0 0 3 0x14200 aiodoned aiodoned 46492 366076 0 0 3 0x14200 syncer update 31062 84245 0 0 3 0x14200 cleaner cleaner 57031 133268 0 0 3 0x14200 reaper reaper 11442 69310 0 0 3 0x14200 pgdaemon pagedaemon 47407 491904 0 0 3 0x14200 bored crynlk 35638 31093 0 0 3 0x14200 bored crypto 38573 65051 0 0 3 0x40014200 acpi0 acpi0 3954 417503 0 0 3 0x14200 bored softnet 84067 31233 0 0 3 0x14200 bored systqmp 48689 496465 0 0 3 0x14200 bored systq 22091 390182 0 0 3 0x40014200 bored softclock 92171 291430 0 0 3 0x40014200 idle0 1 349522 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 9513 6355K 7165K 78643K 11123 0 pcb 13 8K 8K 78643K 125 0 rtable 122 6K 9K 78643K 633 0 ifaddr 77 14K 15K 78643K 199 0 sysctl 2 0K 0K 78643K 4 0 counters 21 16K 16K 78643K 32 0 ioctlops 0 0K 4K 78643K 110 0 iov 0 0K 16K 78643K 112 0 mount 1 1K 1K 78643K 1 0 vnodes 1217 77K 77K 78643K 1479 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 9 0 VM map 2 0K 0K 78643K 2 0 sem 12 0K 0K 78643K 230 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1809 195K 288K 78643K 12938 0 file desc 5 13K 25K 78643K 989 0 sigio 0 0K 0K 78643K 8 0 proc 50 38K 55K 78643K 491 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 74 0 in_multi 60 3K 3K 78643K 159 0 ether_multi 1 0K 0K 78643K 25 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 61 281K 281K 78643K 61 0 exec 0 0K 1K 78643K 273 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 133 40K 58K 78643K 3148 0 UVM aobj 49 2K 2K 78643K 55 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 134 0 NDP 15 0K 0K 78643K 35 0 temp 133 3045K 3110K 78643K 20285 0 kqueue 3 4K 12K 78643K 60 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 11 0 4 1 0 1 1 0 8 0 rtpcb 80 46 0 43 1 0 1 1 0 8 0 rtentry 112 88 0 42 2 0 2 2 0 8 0 unpcb 120 276 0 268 1 0 1 1 0 8 0 syncache 264 14 0 14 3 3 0 1 0 8 0 tcpqe 32 48 0 48 3 3 0 1 0 8 0 tcpcb 544 306 0 302 2 1 1 2 0 8 0 ipq 40 2 0 2 1 0 1 1 0 8 1 ipqe 40 4 0 4 1 0 1 1 0 8 1 inpcb 280 684 0 677 3 2 1 2 0 8 0 rttmr 72 1 0 1 1 0 1 1 0 8 1 ip6q 72 1 0 1 1 1 0 1 0 8 0 ip6af 40 2 0 2 1 1 0 1 0 8 0 nd6 48 18 0 13 1 0 1 1 0 8 0 ppxss 1128 3 0 3 3 3 0 1 0 8 0 pfstscr 40 4 0 2 1 0 1 1 0 8 0 pfosfp 40 1 0 0 1 0 1 1 0 8 0 pfosfpen 112 2 0 0 1 0 1 1 0 8 0 pfrke_plain 160 10 0 10 1 0 1 1 0 8 1 pfrktable 1344 103 0 101 1 0 1 1 0 8 0 pftag 88 18 0 18 3 2 1 1 0 8 1 pfstitem 24 2 0 1 1 0 1 1 0 8 0 pfstkey 112 3 0 2 1 0 1 1 0 8 0 pfstate 328 2 0 1 1 0 1 1 0 8 0 pfrule 1360 24 0 18 1 0 1 1 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 389 0 179 15 1 14 14 0 8 0 art_table 32 391 0 179 2 0 2 2 0 8 0 art_node 16 87 0 44 1 0 1 1 0 8 0 sysvmsgpl 40 14 0 7 2 1 1 1 0 8 0 semupl 112 4 0 4 1 1 0 1 0 8 0 semapl 112 226 0 216 1 0 1 1 0 8 0 shmpl 112 53 0 6 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 2690 0 1297 88 0 88 88 0 8 0 ffsino 240 2690 0 1297 83 0 83 83 0 8 0 nchpl 144 4246 0 2658 60 0 60 60 0 8 0 rtmask 32 12 0 12 1 0 1 1 0 8 1 uvmvnodes 72 2877 0 0 53 0 53 53 0 8 0 vnodes 208 2877 0 0 152 0 152 152 0 8 0 namei 1024 14189 0 14188 1 0 1 1 0 8 0 vcpupl 1984 3 0 1 1 0 1 1 0 8 0 vmpool 528 3 0 1 1 0 1 1 0 8 0 pfiaddrpl 120 30 0 28 1 0 1 1 0 8 0 scxspl 192 12107 0 12107 1 0 1 1 0 8 1 plimitpl 152 52 0 45 1 0 1 1 0 8 0 sigapl 424 1190 0 1141 6 0 6 6 0 8 0 futexpl 56 18373 0 18373 1 0 1 1 0 8 1 knotepl 112 163 0 144 1 0 1 1 0 8 0 kqueuepl 144 690 0 687 1 0 1 1 0 8 0 pipelkpl 16 169 0 159 1 0 1 1 0 8 0 pipepl 120 338 0 319 1 0 1 1 0 8 0 fdescpl 432 1155 0 1141 2 0 2 2 0 8 0 filepl 120 8163 0 8067 4 0 4 4 0 8 1 lockfpl 104 139 0 138 1 0 1 1 0 8 0 lockfspl 48 51 0 50 1 0 1 1 0 8 0 sessionpl 112 19 0 9 1 0 1 1 0 8 0 pgrppl 48 27 0 17 1 0 1 1 0 8 0 ucredpl 96 2207 0 2200 1 0 1 1 0 8 0 zombiepl 144 1141 0 1141 1 0 1 1 0 8 1 processpl 920 1190 0 1141 7 0 7 7 0 8 0 procpl 624 2336 0 2279 6 1 5 6 0 8 0 sosppl 128 8 0 8 3 2 1 1 0 8 1 sockpl 400 1010 0 992 5 2 3 4 0 8 1 mcl64k 65536 72 0 72 3 2 1 1 0 8 1 mcl16k 16384 10 0 10 3 3 0 1 0 8 0 mcl12k 12288 18 0 18 3 2 1 1 0 8 1 mcl9k 9216 14 0 14 2 2 0 1 0 8 0 mcl8k 8192 70 0 70 1 0 1 1 0 8 1 mcl4k 4096 243 0 243 2 1 1 1 0 8 1 mcl2k2 2112 4 0 4 2 2 0 1 0 8 0 mcl2k 2048 76665 0 76626 14 8 6 12 0 8 0 mtagpl 80 18 0 18 2 1 1 1 0 8 1 mbufpl 256 128076 0 127975 17 7 10 14 0 8 2 bufpl 280 5361 0 126 374 0 374 374 0 8 0 anonpl 16 207444 0 195096 83 13 70 77 0 107 2 amapchunkpl 152 4952 0 4791 16 8 8 13 0 158 1 amappl16 192 11253 0 10348 60 11 49 60 0 8 2 amappl15 184 2 0 1 1 0 1 1 0 8 0 amappl14 176 287 0 281 1 0 1 1 0 8 0 amappl13 168 709 0 703 1 0 1 1 0 8 0 amappl12 160 6 0 6 2 2 0 1 0 8 0 amappl11 152 52 0 43 1 0 1 1 0 8 0 amappl10 144 38 0 33 1 0 1 1 0 8 0 amappl9 136 378 0 376 1 0 1 1 0 8 0 amappl8 128 397 0 353 2 0 2 2 0 8 0 amappl7 120 123 0 110 1 0 1 1 0 8 0 amappl6 112 26 0 19 1 0 1 1 0 8 0 amappl5 104 1018 0 1007 1 0 1 1 0 8 0 amappl4 96 1045 0 1016 1 0 1 1 0 8 0 amappl3 88 378 0 373 1 0 1 1 0 8 0 amappl2 80 7741 0 7677 2 0 2 2 0 8 0 amappl1 72 28484 0 28070 23 13 10 17 0 8 0 amappl 80 2589 0 2548 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 54 0 6 1 0 1 1 0 8 0 uaddrrnd 24 1158 0 1142 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1158 0 1142 1 0 1 1 0 8 0 vmmpekpl 168 10233 0 10202 2 0 2 2 0 8 0 vmmpepl 168 144674 0 142682 167 44 123 123 0 357 32 vmsppl 272 1157 0 1142 2 0 2 2 0 8 0 pdppl 4096 2322 0 2286 6 1 5 6 0 8 0 pvpl 32 513768 0 498832 192 23 169 183 0 265 11 pmappl 200 1157 0 1142 1 0 1 1 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 256 0 29 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(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(ffff800000a3e400,ffff80001d804640,ffff80001d804598,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd805bce2800,fffffd805e55a960,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd805e55a960,9,fffffd805bce2800,0,0,ffff80001d7739e0) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd805e55a960,0,ffff80001d804830,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d7739e0,3,ffff80001d804910,0,ffff80001d8049f0) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d7739e0,ffff80001d8049a8,ffff80001d8049f0) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001d804a70) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x117fbb636c0, 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(ffff800000a3e400,ffff80001d804640,ffff80001d804598,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd805bce2800,fffffd805e55a960,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd805e55a960,9,fffffd805bce2800,0,0,ffff80001d7739e0) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd805e55a960,0,ffff80001d804830,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d7739e0,3,ffff80001d804910,0,ffff80001d8049f0) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d7739e0,ffff80001d8049a8,ffff80001d8049f0) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001d804a70) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x117fbb636c0, count: -11