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 *311011 90725 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(ffff800000b07f00,ffff80001f864b90,ffff80001f864ae8,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd80578a9a00,fffffd8057c2dc90,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd8057c2dc90,9,fffffd80578a9a00,0,0,ffff80001d709770) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd8057c2dc90,0,ffff80001f864d80,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d709770,3,ffff80001f864e60,0,ffff80001f864f40) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d709770,ffff80001f864ef8,ffff80001f864f40) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001f864fc0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7dd79c13070, 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(ffff800000b07f00,ffff80001f864b90,ffff80001f864ae8,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd80578a9a00,fffffd8057c2dc90,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd8057c2dc90,9,fffffd80578a9a00,0,0,ffff80001d709770) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd8057c2dc90,0,ffff80001f864d80,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d709770,3,ffff80001f864e60,0,ffff80001f864f40) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d709770,ffff80001f864ef8,ffff80001f864f40) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001f864fc0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7dd79c13070, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001f864960 rbx 0xffff80001f864a10 rdx 0x2 rcx 0 rax 0x1 r8 0xffffffff8120980f kprintf+0x15f r9 0x1 r10 0x2 r11 0xe866f1e4f1a610a7 r12 0x3000000008 r13 0xffff80001f864970 r14 0x100 r15 0x1 rip 0xffffffff81fbc738 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001f864950 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=311011 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=78, nice=20 forw=0xffffffffffffffff, list=0xffff80001d70aaf0,0xffffffff8283fb58 process=0xffff80001f84a030 user=0xffff80001f860000, vmspace=0xfffffd8068190560 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 90725 200488 15300 0 2 0 syz-executor.1 *90725 311011 15300 0 7 0x4000000 syz-executor.1 15300 36 13797 0 3 0x82 nanosleep syz-executor.1 35663 298753 0 0 3 0x14280 nfsidl nfsio 35662 347608 0 0 3 0x14280 nfsidl nfsio 61737 264374 0 0 3 0x14280 nfsidl nfsio 31260 123477 0 0 3 0x14280 nfsidl nfsio 99329 517570 0 0 3 0x14280 nfsidl nfsio 63336 156292 0 0 3 0x14280 nfsidl nfsio 90804 216417 0 0 3 0x14280 nfsidl nfsio 67440 478797 0 0 3 0x14280 nfsidl nfsio 75785 345085 0 0 3 0x14280 nfsidl nfsio 61799 58608 0 0 3 0x14280 nfsidl nfsio 38776 524102 0 0 3 0x14280 nfsidl nfsio 92461 481151 0 0 3 0x14280 nfsidl nfsio 23207 453408 0 0 3 0x14280 nfsidl nfsio 5726 352075 0 0 3 0x14280 nfsidl nfsio 53496 221545 0 0 3 0x14280 nfsidl nfsio 93899 306548 0 0 3 0x14280 nfsidl nfsio 81392 145107 0 0 3 0x14280 nfsidl nfsio 53944 2154 0 0 3 0x14280 nfsidl nfsio 48644 39783 0 0 3 0x14280 nfsidl nfsio 54116 299013 0 0 3 0x14280 nfsidl nfsio 6592 230604 0 0 3 0x14200 acct acct 88637 339669 13797 0 2 0x2 syz-executor.0 19996 289910 0 0 3 0x14200 bored sosplice 13797 234177 92263 0 3 0x82 thrsleep syz-fuzzer 13797 26309 92263 0 2 0x4000482 syz-fuzzer 13797 381435 92263 0 3 0x4000082 thrsleep syz-fuzzer 13797 467665 92263 0 3 0x4000082 thrsleep syz-fuzzer 13797 309275 92263 0 3 0x4000082 thrsleep syz-fuzzer 13797 313045 92263 0 3 0x4000082 kqread syz-fuzzer 13797 315076 92263 0 3 0x4000082 thrsleep syz-fuzzer 13797 62206 92263 0 3 0x4000082 thrsleep syz-fuzzer 92263 299875 96093 0 3 0x10008a pause ksh 96093 26347 60153 0 3 0x92 select sshd 67355 339762 1 0 3 0x100083 ttyin getty 60153 352459 1 0 3 0x80 select sshd 84553 52519 83400 73 3 0x100090 kqread syslogd 83400 386275 1 0 3 0x100082 netio syslogd 84401 68826 1 77 3 0x100090 poll dhclient 74249 131776 1 0 3 0x80 poll dhclient 82850 505440 0 0 3 0x14200 bored smr 77140 516651 0 0 2 0x14200 zerothread 3749 520463 0 0 3 0x14200 aiodoned aiodoned 81104 515591 0 0 3 0x14200 syncer update 22237 220868 0 0 3 0x14200 cleaner cleaner 23475 496 0 0 3 0x14200 reaper reaper 12858 128945 0 0 3 0x14200 pgdaemon pagedaemon 12775 926 0 0 3 0x14200 bored crynlk 97616 375917 0 0 3 0x14200 bored crypto 46537 144169 0 0 3 0x40014200 acpi0 acpi0 71153 49996 0 0 3 0x14200 bored softnet 17517 6739 0 0 3 0x14200 bored systqmp 61712 256661 0 0 3 0x14200 bored systq 71226 464999 0 0 3 0x40014200 bored softclock 84871 75680 0 0 3 0x40014200 idle0 1 497362 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 9554 6574K 7452K 78643K 16332 0 pcb 13 8K 8K 78643K 197 0 rtable 168 17K 18K 78643K 1125 0 ifaddr 129 26K 27K 78643K 363 0 sysctl 2 0K 0K 78643K 2 0 counters 21 16K 16K 78643K 42 0 ioctlops 0 0K 4K 78643K 774 0 iov 0 0K 32K 78643K 202 0 mount 1 1K 1K 78643K 1 0 vnodes 1219 77K 77K 78643K 2734 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 15 0 VM map 2 0K 0K 78643K 2 0 sem 12 0K 0K 78643K 265 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1809 195K 288K 78643K 12938 0 file desc 5 13K 25K 78643K 1178 0 sigio 0 0K 0K 78643K 42 0 proc 50 38K 55K 78643K 645 0 subproc 32 2K 2K 78643K 102 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 106 0 in_multi 171 7K 7K 78643K 361 0 ether_multi 1 0K 0K 78643K 43 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 67 307K 307K 78643K 67 0 exec 0 0K 1K 78643K 350 0 pfkey data 0 0K 0K 78643K 2 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 165 170K 186K 78643K 3710 0 UVM aobj 42 6K 7K 78643K 47 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 196 0 NDP 16 0K 0K 78643K 55 0 temp 159 3880K 3960K 78643K 30329 0 kqueue 3 4K 14K 78643K 76 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 22 0 13 1 0 1 1 0 8 0 rtpcb 80 108 0 105 1 0 1 1 0 8 0 rtentry 112 139 0 95 2 0 2 2 0 8 0 unpcb 120 537 0 529 1 0 1 1 0 8 0 syncache 264 18 0 18 5 4 1 1 0 8 1 sackhl 24 1 0 1 1 1 0 1 0 8 0 tcpqe 32 14 0 14 2 2 0 1 0 8 0 tcpcb 544 512 0 508 1 0 1 1 0 8 0 ipq 40 5 0 4 2 1 1 1 0 8 0 ipqe 40 98 0 97 2 1 1 1 0 8 0 inpcb 280 1310 0 1303 6 4 2 2 0 8 1 rttmr 72 2 0 2 1 1 0 1 0 8 0 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 27 0 25 1 0 1 1 0 8 0 pkpcb 40 8 0 8 4 3 1 1 0 8 1 swfcl 56 4 0 0 1 0 1 1 0 8 0 ppxss 1128 2 0 2 2 2 0 1 0 8 0 pfrktable 1344 232 0 205 4 1 3 3 0 8 0 pftag 88 23 0 12 1 0 1 1 0 8 0 pfstitem 24 4 0 0 1 0 1 1 0 8 0 pfstkey 112 4 0 0 1 0 1 1 0 8 0 pfstate 328 2 0 0 1 0 1 1 0 8 0 pfrule 1360 81 0 35 4 0 4 4 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 641 0 449 18 2 16 16 0 8 1 art_table 32 643 0 449 2 0 2 2 0 8 0 art_node 16 138 0 96 1 0 1 1 0 8 0 sysvmsgpl 40 28 0 13 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 260 0 250 1 0 1 1 0 8 0 shmpl 112 45 0 5 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 2976 0 1575 88 0 88 88 0 8 0 ffsino 240 2976 0 1575 83 0 83 83 0 8 0 nchpl 144 4767 0 3191 60 0 60 60 0 8 0 uvmvnodes 72 4368 0 0 80 0 80 80 0 8 0 vnodes 208 4368 0 0 230 0 230 230 0 8 0 namei 1024 15539 0 15538 2 1 1 1 0 8 0 vcpupl 1984 19 0 0 3 0 3 3 0 8 0 vmpool 528 25 0 6 2 0 2 2 0 8 0 pfiaddrpl 120 96 0 62 2 0 2 2 0 8 0 scxspl 192 15193 0 15193 2 1 1 1 0 8 1 plimitpl 152 87 0 80 1 0 1 1 0 8 0 sigapl 424 1374 0 1324 6 0 6 6 0 8 0 futexpl 56 27056 0 27056 2 1 1 1 0 8 1 knotepl 112 200 0 181 1 0 1 1 0 8 0 kqueuepl 144 202 0 200 1 0 1 1 0 8 0 pipelkpl 16 272 0 262 1 0 1 1 0 8 0 pipepl 120 544 0 525 3 1 2 2 0 8 0 fdescpl 432 1338 0 1324 2 0 2 2 0 8 0 filepl 120 9363 0 9267 5 1 4 5 0 8 1 lockfpl 104 215 0 214 1 0 1 1 0 8 0 lockfspl 48 81 0 80 1 0 1 1 0 8 0 sessionpl 112 21 0 11 1 0 1 1 0 8 0 pgrppl 48 29 0 19 1 0 1 1 0 8 0 ucredpl 96 881 0 874 1 0 1 1 0 8 0 zombiepl 144 1324 0 1324 1 0 1 1 0 8 1 processpl 920 1374 0 1324 7 0 7 7 0 8 0 procpl 624 2731 0 2673 6 1 5 6 0 8 0 sosppl 128 15 0 15 2 2 0 1 0 8 0 sockpl 400 1965 0 1945 8 4 4 5 0 8 1 mcl64k 65536 367 0 367 34 33 1 33 0 8 1 mcl16k 16384 10 0 10 5 4 1 1 0 8 1 mcl12k 12288 36 0 36 3 2 1 1 0 8 1 mcl9k 9216 12 0 12 5 4 1 1 0 8 1 mcl8k 8192 42 0 42 4 3 1 1 0 8 1 mcl4k 4096 138 0 136 3 2 1 1 0 8 0 mcl2k2 2112 18 0 18 6 5 1 1 0 8 1 mcl2k 2048 76770 0 76726 18 11 7 14 0 8 0 mtagpl 80 666 0 560 9 2 7 7 0 8 0 mbufpl 256 130892 0 130555 59 12 47 47 0 8 5 bufpl 280 6535 0 1183 383 0 383 383 0 8 0 anonpl 16 158620 0 142467 110 28 82 82 0 107 12 amapchunkpl 152 7957 0 7826 44 25 19 19 0 158 12 amappl16 192 7347 0 6421 90 32 58 59 0 8 11 amappl15 184 68 0 67 1 0 1 1 0 8 0 amappl14 176 384 0 376 1 0 1 1 0 8 0 amappl13 168 224 0 221 1 0 1 1 0 8 0 amappl12 160 515 0 513 2 1 1 1 0 8 0 amappl11 152 68 0 57 1 0 1 1 0 8 0 amappl10 144 155 0 150 1 0 1 1 0 8 0 amappl9 136 383 0 381 1 0 1 1 0 8 0 amappl8 128 453 0 400 2 0 2 2 0 8 0 amappl7 120 266 0 252 1 0 1 1 0 8 0 amappl6 112 29 0 23 1 0 1 1 0 8 0 amappl5 104 1698 0 1687 1 0 1 1 0 8 0 amappl4 96 658 0 629 1 0 1 1 0 8 0 amappl3 88 418 0 411 1 0 1 1 0 8 0 amappl2 80 9693 0 9628 2 0 2 2 0 8 0 amappl1 72 32891 0 32478 23 14 9 17 0 8 0 amappl 80 3042 0 2989 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 5 1 0 1 1 0 8 0 uaddrrnd 24 1363 0 1330 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1363 0 1330 1 0 1 1 0 8 0 vmmpekpl 168 11359 0 11317 3 0 3 3 0 8 0 vmmpepl 168 165839 0 163754 169 59 110 126 0 357 13 vmsppl 272 1362 0 1330 3 0 3 3 0 8 0 pdppl 4096 2732 0 2679 8 1 7 7 0 8 0 pvpl 32 411025 0 392290 233 43 190 193 0 265 32 pmappl 200 1362 0 1330 2 0 2 2 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 351 0 76 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(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(ffff800000b07f00,ffff80001f864b90,ffff80001f864ae8,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd80578a9a00,fffffd8057c2dc90,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd8057c2dc90,9,fffffd80578a9a00,0,0,ffff80001d709770) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd8057c2dc90,0,ffff80001f864d80,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d709770,3,ffff80001f864e60,0,ffff80001f864f40) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d709770,ffff80001f864ef8,ffff80001f864f40) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001f864fc0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7dd79c13070, 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(ffff800000b07f00,ffff80001f864b90,ffff80001f864ae8,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd80578a9a00,fffffd8057c2dc90,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd8057c2dc90,9,fffffd80578a9a00,0,0,ffff80001d709770) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd8057c2dc90,0,ffff80001f864d80,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d709770,3,ffff80001f864e60,0,ffff80001f864f40) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d709770,ffff80001f864ef8,ffff80001f864f40) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001f864fc0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7dd79c13070, count: -11