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 * 32528 64619 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(ffff800000a64200,ffff80001fea4dc0,ffff80001fea4d18,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd806bc22000,fffffd805e56f4b0,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd805e56f4b0,9,fffffd806bc22000,0,0,ffff80001d789508) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd805e56f4b0,0,ffff80001fea4fb0,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d789508,3,ffff80001fea5090,0,ffff80001fea5170) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d789508,ffff80001fea5128,ffff80001fea5170) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001fea51f0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x601db94d040, 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(ffff800000a64200,ffff80001fea4dc0,ffff80001fea4d18,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd806bc22000,fffffd805e56f4b0,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd805e56f4b0,9,fffffd806bc22000,0,0,ffff80001d789508) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd805e56f4b0,0,ffff80001fea4fb0,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d789508,3,ffff80001fea5090,0,ffff80001fea5170) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d789508,ffff80001fea5128,ffff80001fea5170) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001fea51f0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x601db94d040, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001fea4b90 rbx 0xffff80001fea4c40 rdx 0x2 rcx 0 rax 0x1 r8 0xffffffff813a55ef kprintf+0x15f r9 0x1 r10 0x2 r11 0x831a974a7fe3862d r12 0x3000000008 r13 0xffff80001fea4ba0 r14 0x100 r15 0x1 rip 0xffffffff812bfa38 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001fea4b80 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=32528 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=72, nice=20 forw=0xffffffffffffffff, list=0xffff80001d789298,0xffffffff825b67d0 process=0xffff80001fe72030 user=0xffff80001fea0000, vmspace=0xfffffd806bc0a770 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 64619 161787 46974 0 2 0 syz-executor.1 *64619 32528 46974 0 7 0x4000000 syz-executor.1 15051 186843 67002 0 2 0 syz-executor.0 15051 345772 67002 0 3 0x4000080 bell syz-executor.0 46974 84675 18238 0 2 0x482 syz-executor.1 12418 419407 0 0 3 0x14280 nfsidl nfsio 62808 30613 0 0 3 0x14280 nfsidl nfsio 92363 294259 0 0 3 0x14280 nfsidl nfsio 30787 452510 0 0 3 0x14280 nfsidl nfsio 37226 195411 0 0 3 0x14280 nfsidl nfsio 46166 72105 0 0 3 0x14280 nfsidl nfsio 5148 93715 0 0 3 0x14280 nfsidl nfsio 75539 4350 0 0 3 0x14280 nfsidl nfsio 74787 297806 0 0 3 0x14280 nfsidl nfsio 85376 521104 0 0 3 0x14280 nfsidl nfsio 5088 81064 0 0 3 0x14280 nfsidl nfsio 87164 480181 0 0 3 0x14280 nfsidl nfsio 26166 399957 0 0 3 0x14280 nfsidl nfsio 32336 486794 0 0 3 0x14280 nfsidl nfsio 31806 365811 0 0 3 0x14280 nfsidl nfsio 24263 414711 0 0 3 0x14280 nfsidl nfsio 23550 124248 0 0 3 0x14280 nfsidl nfsio 25333 31940 0 0 3 0x14280 nfsidl nfsio 34585 41552 0 0 3 0x14280 nfsidl nfsio 14972 122076 0 0 3 0x14280 nfsidl nfsio 17682 491824 0 0 3 0x14200 acct acct 67002 407843 18238 0 2 0x482 syz-executor.0 99719 103600 0 0 3 0x14200 bored sosplice 18238 467869 14147 0 3 0x82 thrsleep syz-fuzzer 18238 245547 14147 0 2 0x4000482 syz-fuzzer 18238 294274 14147 0 3 0x4000082 thrsleep syz-fuzzer 18238 410174 14147 0 3 0x4000082 thrsleep syz-fuzzer 18238 113508 14147 0 3 0x4000082 thrsleep syz-fuzzer 18238 335228 14147 0 3 0x4000082 thrsleep syz-fuzzer 18238 520356 14147 0 3 0x4000082 thrsleep syz-fuzzer 18238 466102 14147 0 3 0x4000082 kqread syz-fuzzer 14147 309931 21307 0 3 0x10008a pause ksh 21307 269529 40802 0 3 0x92 select sshd 22693 96447 1 0 3 0x100083 ttyin getty 40802 127048 1 0 3 0x80 select sshd 57481 448969 87718 73 3 0x100090 kqread syslogd 87718 302443 1 0 3 0x100082 netio syslogd 53292 278254 1 77 3 0x100090 poll dhclient 23324 346388 1 0 3 0x80 poll dhclient 57829 159893 0 0 3 0x14200 bored smr 49165 62313 0 0 2 0x14200 zerothread 39112 248607 0 0 3 0x14200 aiodoned aiodoned 63791 235046 0 0 3 0x14200 syncer update 77438 113560 0 0 3 0x14200 cleaner cleaner 28862 164069 0 0 3 0x14200 reaper reaper 76594 504439 0 0 3 0x14200 pgdaemon pagedaemon 62822 484523 0 0 3 0x14200 bored crynlk 11462 127892 0 0 3 0x14200 bored crypto 903 481419 0 0 3 0x40014200 acpi0 acpi0 6098 209962 0 0 3 0x14200 bored softnet 35997 228896 0 0 3 0x14200 bored systqmp 21609 154768 0 0 3 0x14200 bored systq 78024 43503 0 0 2 0x40014200 softclock 45063 266595 0 0 3 0x40014200 idle0 1 84455 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 9537 6366K 6867K 78643K 12248 0 pcb 13 8K 8K 78643K 210 0 rtable 150 12K 13K 78643K 1034 0 ifaddr 115 23K 23K 78643K 334 0 sysctl 2 0K 0K 78643K 2 0 counters 21 16K 16K 78643K 45 0 ioctlops 0 0K 4K 78643K 217 0 iov 0 0K 24K 78643K 162 0 mount 1 1K 1K 78643K 1 0 vnodes 1217 77K 77K 78643K 1781 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 20 0 VM map 2 0K 0K 78643K 2 0 sem 12 1K 1K 78643K 20 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1809 195K 288K 78643K 12938 0 file desc 6 17K 25K 78643K 995 0 sigio 0 0K 0K 78643K 6 0 proc 49 38K 63K 78643K 556 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 77 0 in_multi 94 4K 4K 78643K 222 0 ether_multi 1 0K 0K 78643K 38 0 mrt 0 0K 0K 78643K 14 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 283 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 155 154K 154K 78643K 3354 0 UVM aobj 39 2K 2K 78643K 43 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 174 0 NDP 16 0K 0K 78643K 52 0 temp 152 3054K 3130K 78643K 48111 0 kqueue 3 4K 14K 78643K 97 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 17 0 9 1 0 1 1 0 8 0 rtpcb 80 86 0 83 1 0 1 1 0 8 0 rtentry 112 102 0 55 2 0 2 2 0 8 0 unpcb 120 570 0 562 1 0 1 1 0 8 0 syncache 264 14 0 14 5 5 0 1 0 8 0 tcpqe 32 104 0 104 5 5 0 1 0 8 0 tcpcb 544 426 0 422 3 2 1 2 0 8 0 ipq 40 6 0 6 4 4 0 1 0 8 0 ipqe 40 228 0 228 4 4 0 1 0 8 0 inpcb 280 2304 0 2296 5 3 2 2 0 8 1 rttmr 72 4 0 4 3 3 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 17 0 12 1 0 1 1 0 8 0 pkpcb 40 6 0 6 2 2 0 1 0 8 0 ppxss 1128 3 0 3 2 2 0 1 0 8 0 pfstscr 40 1 0 0 1 0 1 1 0 8 0 pfrktable 1344 230 0 214 5 3 2 2 0 8 0 pftag 88 56 0 48 1 0 1 1 0 8 0 pfqueue 264 2 0 2 1 1 0 1 0 8 0 pfstitem 24 2 0 0 1 0 1 1 0 8 0 pfstkey 112 2 0 0 1 0 1 1 0 8 0 pfstate 328 1 0 0 1 0 1 1 0 8 0 pfrule 1360 78 0 50 4 1 3 3 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 432 0 220 15 1 14 14 0 8 0 art_table 32 434 0 220 2 0 2 2 0 8 0 art_node 16 101 0 57 1 0 1 1 0 8 0 sysvmsgpl 40 38 0 25 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 12 0 2 1 0 1 1 0 8 0 shmpl 112 41 0 4 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 2821 0 1431 88 0 88 88 0 8 0 ffsino 240 2821 0 1431 83 0 83 83 0 8 0 nchpl 144 4399 0 2817 60 0 60 60 0 8 0 uvmvnodes 72 3232 0 0 59 0 59 59 0 8 0 vnodes 208 3232 0 0 171 0 171 171 0 8 0 namei 1024 13167 0 13167 4 3 1 1 0 8 1 vcpupl 1984 15 0 0 2 0 2 2 0 8 0 vmpool 528 23 0 8 2 1 1 1 0 8 0 pfiaddrpl 120 106 0 88 1 0 1 1 0 8 0 scxspl 192 13662 0 13662 1 0 1 1 0 8 1 plimitpl 152 87 0 80 1 0 1 1 0 8 0 sigapl 424 1197 0 1146 6 0 6 6 0 8 0 futexpl 56 21594 0 21594 4 3 1 1 0 8 1 knotepl 112 196 0 177 1 0 1 1 0 8 0 kqueuepl 144 198 0 196 1 0 1 1 0 8 0 pipelkpl 16 223 0 212 1 0 1 1 0 8 0 pipepl 120 446 0 425 1 0 1 1 0 8 0 fdescpl 432 1161 0 1146 2 0 2 2 0 8 0 filepl 120 8658 0 8558 4 0 4 4 0 8 0 lockfpl 104 179 0 178 1 0 1 1 0 8 0 lockfspl 48 63 0 62 1 0 1 1 0 8 0 sessionpl 112 19 0 9 1 0 1 1 0 8 0 pgrppl 48 25 0 15 1 0 1 1 0 8 0 ucredpl 96 883 0 876 1 0 1 1 0 8 0 zombiepl 144 1146 0 1146 1 0 1 1 0 8 1 processpl 920 1197 0 1146 7 0 7 7 0 8 0 procpl 624 2495 0 2435 7 2 5 6 0 8 0 sosppl 128 14 0 14 2 2 0 1 0 8 0 sockpl 400 2977 0 2958 8 5 3 4 0 8 1 mcl64k 65536 88 0 88 5 4 1 1 0 8 1 mcl16k 16384 5 0 5 4 3 1 1 0 8 1 mcl12k 12288 22 0 22 4 4 0 1 0 8 0 mcl9k 9216 24 0 24 6 5 1 1 0 8 1 mcl8k 8192 38 0 38 6 6 0 1 0 8 0 mcl4k 4096 76 0 76 5 4 1 1 0 8 1 mcl2k2 2112 5 0 5 3 3 0 1 0 8 0 mcl2k 2048 77575 0 77527 17 10 7 13 0 8 0 mtagpl 80 87 0 70 2 1 1 1 0 8 0 mbufpl 256 130953 0 130830 38 27 11 19 0 8 0 bufpl 280 6162 0 802 383 0 383 383 0 8 0 anonpl 16 132110 0 115720 116 50 66 80 0 107 0 amapchunkpl 152 6272 0 6086 36 28 8 19 0 158 0 amappl16 192 6118 0 5246 94 49 45 56 0 8 0 amappl15 184 694 0 689 1 0 1 1 0 8 0 amappl14 176 23 0 19 1 0 1 1 0 8 0 amappl13 168 41 0 38 1 0 1 1 0 8 0 amappl12 160 15 0 11 1 0 1 1 0 8 0 amappl11 152 372 0 360 1 0 1 1 0 8 0 amappl10 144 250 0 246 1 0 1 1 0 8 0 amappl9 136 369 0 368 1 0 1 1 0 8 0 amappl8 128 393 0 350 2 0 2 2 0 8 0 amappl7 120 119 0 106 1 0 1 1 0 8 0 amappl6 112 28 0 23 1 0 1 1 0 8 0 amappl5 104 1102 0 1087 1 0 1 1 0 8 0 amappl4 96 460 0 429 1 0 1 1 0 8 0 amappl3 88 144 0 139 1 0 1 1 0 8 0 amappl2 80 9040 0 8960 2 0 2 2 0 8 0 amappl1 72 30309 0 29878 23 14 9 17 0 8 0 amappl 80 2766 0 2714 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 42 0 4 1 0 1 1 0 8 0 uaddrrnd 24 1184 0 1154 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1184 0 1154 1 0 1 1 0 8 0 vmmpekpl 168 10953 0 10914 2 0 2 2 0 8 0 vmmpepl 168 142113 0 140014 156 63 93 123 0 357 1 vmsppl 272 1183 0 1154 4 2 2 2 0 8 0 pdppl 4096 2374 0 2323 8 1 7 7 0 8 0 pvpl 32 358363 0 339385 249 78 171 193 0 265 16 pmappl 200 1183 0 1154 2 0 2 2 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 306 0 73 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(ffff800000a64200,ffff80001fea4dc0,ffff80001fea4d18,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd806bc22000,fffffd805e56f4b0,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd805e56f4b0,9,fffffd806bc22000,0,0,ffff80001d789508) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd805e56f4b0,0,ffff80001fea4fb0,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d789508,3,ffff80001fea5090,0,ffff80001fea5170) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d789508,ffff80001fea5128,ffff80001fea5170) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001fea51f0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x601db94d040, 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(ffff800000a64200,ffff80001fea4dc0,ffff80001fea4d18,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd806bc22000,fffffd805e56f4b0,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd805e56f4b0,9,fffffd806bc22000,0,0,ffff80001d789508) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd805e56f4b0,0,ffff80001fea4fb0,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d789508,3,ffff80001fea5090,0,ffff80001fea5170) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d789508,ffff80001fea5128,ffff80001fea5170) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001fea51f0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x601db94d040, count: -11