panic: kernel diagnostic assertion "sin6tosa(&ro->ro_dst)->sa_family == AF_INET6" failed: file "/syzkaller/managers/setuid/kernel/sys/netinet6/in6_src.c", line 328 Stopped at db_enter+0x1c: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *441624 93342 32767 0x10 0 1 syz-executor3992266023 352037 67085 0 0x14000 0x200 0 softnet0 db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82873283) at panic+0x17b sys/kern/subr_prf.c:198 __assert(ffffffff828f938f,ffffffff82868107,148,ffffffff829481fe) at __assert+0x29 sys/kern/subr_prf.c:157 in6_selectroute(ffff80002a1f01b0,ffff8000006d0680,fffffd80794b3368,0) at in6_selectroute+0x228 sys/netinet6/in6_src.c:328 ip6_output(fffffd806d4b5f00,ffff8000006d0680,fffffd80794b3368,0,0,fffffd80794b3428) at ip6_output+0xc6a sys/netinet6/ip6_output.c:467 tcp_output(ffff800000dac328) at tcp_output+0x2877 sys/netinet/tcp_output.c:1110 tcp_connect(fffffd80794c6b78,fffffd806d235800) at tcp_connect+0x33a sys/netinet/tcp_usrreq.c:670 sys_connect(ffff80002a199ab0,ffff80002a1f0650,ffff80002a1f05a0) at sys_connect+0x207 sys/kern/uipc_syscalls.c:422 syscall(ffff80002a1f0650) at syscall+0x5ae mi_syscall sys/sys/syscall_mi.h:183 [inline] syscall(ffff80002a1f0650) at syscall+0x5ae sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7ec5994aa6d0, count: 5 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{1}> ddb{1}> set $lines = 0 ddb{1}> set $maxwidth = 0 ddb{1}> show panic *cpu1: kernel diagnostic assertion "sin6tosa(&ro->ro_dst)->sa_family == AF_INET6" failed: file "/syzkaller/managers/setuid/kernel/sys/netinet6/in6_src.c", line 328 ddb{1}> trace db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82873283) at panic+0x17b sys/kern/subr_prf.c:198 __assert(ffffffff828f938f,ffffffff82868107,148,ffffffff829481fe) at __assert+0x29 sys/kern/subr_prf.c:157 in6_selectroute(ffff80002a1f01b0,ffff8000006d0680,fffffd80794b3368,0) at in6_selectroute+0x228 sys/netinet6/in6_src.c:328 ip6_output(fffffd806d4b5f00,ffff8000006d0680,fffffd80794b3368,0,0,fffffd80794b3428) at ip6_output+0xc6a sys/netinet6/ip6_output.c:467 tcp_output(ffff800000dac328) at tcp_output+0x2877 sys/netinet/tcp_output.c:1110 tcp_connect(fffffd80794c6b78,fffffd806d235800) at tcp_connect+0x33a sys/netinet/tcp_usrreq.c:670 sys_connect(ffff80002a199ab0,ffff80002a1f0650,ffff80002a1f05a0) at sys_connect+0x207 sys/kern/uipc_syscalls.c:422 syscall(ffff80002a1f0650) at syscall+0x5ae mi_syscall sys/sys/syscall_mi.h:183 [inline] syscall(ffff80002a1f0650) at syscall+0x5ae sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7ec5994aa6d0, count: -10 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff80002a1efff0 rbx 0xffff800029cfcca7 rdx 0x3fd rcx 0 rax 0xa4 r8 0x101010101010101 r9 0x8080808080808080 r10 0x3e315a30f8af0776 r11 0xbe0991c4591d89d8 r12 0xffff800029cfcaa8 r13 0 r14 0 r15 0x1 rip 0xffffffff81182e1c db_enter+0x1c cs 0x8 rflags 0x246 rsp 0xffff80002a1effe0 ss 0x10 db_enter+0x1c: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor3992266023) tid=441624 pid=93342 tcnt=1 stat=onproc flags process=10 proc=0 runpri=52, usrpri=52, slppri=24, nice=20 wchan=0x0, wmesg=, ps_single=0x0 forw=0xffffffffffffffff, list=0xffff80002a19a000,0xffffffff82e83cf0 process=0xffff8000ffff4480 user=0xffff80002a1eb000, vmspace=0xfffffd8008b56000 estcpu=2, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND *93342 441624 77309 32767 7 0x10 syz-executor3992266023 77309 277399 26466 0 3 0x82 wait syz-executor3992266023 26466 359260 67540 0 3 0x10008a sigsusp ksh 67540 257721 1212 0 2 0x12 sshd 87385 76660 1 0 3 0x100083 ttyin getty 1212 410294 1 0 3 0x88 kqread sshd 82481 7285 86616 73 3 0x1100090 kqread syslogd 86616 58895 1 0 3 0x100082 netio syslogd 15613 288398 1 0 3 0x100080 kqread resolvd 13976 194289 10587 77 3 0x100092 kqread dhcpleased 32761 244668 10587 77 3 0x100092 kqread dhcpleased 10587 223087 1 0 3 0x80 kqread dhcpleased 10786 290873 0 0 3 0x14200 bored smr 50513 459192 0 0 2 0x14200 zerothread 89239 229071 0 0 3 0x14200 aiodoned aiodoned 35637 444117 0 0 3 0x14200 syncer update 10383 224185 0 0 3 0x14200 cleaner cleaner 52117 373079 0 0 3 0x14200 reaper reaper 22263 397064 0 0 3 0x14200 pgdaemon pagedaemon 67686 495795 0 0 3 0x14200 bored viomb 24054 512700 0 0 3 0x40014200 acpi0 acpi0 66346 482527 0 0 3 0x40014200 idle1 81664 88985 0 0 3 0x14200 bored softnet3 65192 69200 0 0 3 0x14200 bored softnet2 82765 492399 0 0 3 0x14200 bored softnet1 67085 352037 0 0 7 0x14200 softnet0 12032 14494 0 0 3 0x14200 bored systqmp 67727 364539 0 0 3 0x14200 bored systq 4649 275705 0 0 3 0x14200 tmoslp softclockmp 41809 510536 0 0 3 0x40014200 tmoslp softclock 26167 24656 0 0 3 0x40014200 idle0 1 296748 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 93342 (syz-executor3992266023) thread 0xffff80002a199ab0 (441624) exclusive rwlock netlock r = 0 (0xffffffff82d02410) #0 witness_lock+0x447 #1 sys_connect+0x1be isdnssocket sys/kern/uipc_syscalls.c:127 [inline] #1 sys_connect+0x1be sys/kern/uipc_syscalls.c:413 #2 syscall+0x5ae mi_syscall sys/sys/syscall_mi.h:183 [inline] #2 syscall+0x5ae sys/arch/amd64/amd64/trap.c:577 #3 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10149 6388K 6419K 166960K 11227 0 pcb 15 10K 10K 166960K 15 0 rtable 58 1K 2K 166960K 110 0 pf 12 6K 6K 166960K 12 0 ifaddr 12 9K 9K 166960K 12 0 ifgroup 17 1K 1K 166960K 17 0 counters 48 34K 34K 166960K 48 0 ioctlops 0 0K 2K 166960K 21 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1174 73K 74K 166960K 1187 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 1K 166960K 2 0 VM map 2 1K 1K 166960K 2 0 sem 2 0K 0K 166960K 2 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1697 195K 286K 166960K 12548 0 file desc 1 0K 0K 166960K 1 0 proc 56 78K 79K 166960K 247 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 in_multi 11 0K 0K 166960K 11 0 ether_multi 1 0K 0K 166960K 1 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 25 122K 122K 166960K 25 0 exec 0 0K 1K 166960K 243 0 tdb 3 0K 0K 166960K 3 0 pagedep 1 8K 8K 166960K 1 0 inodedep 1 32K 32K 166960K 1 0 newblk 1 0K 0K 166960K 1 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 91 12K 12K 166960K 2410 0 UVM aobj 3 2K 2K 166960K 3 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 2 0K 0K 166960K 2 0 NDP 3 0K 0K 166960K 3 0 temp 1 6696K 6760K 166960K 2852 0 kqueue 11 16K 18K 166960K 24 0 SYN cache 2 16K 16K 166960K 2 0 ddb{1}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle plcache 128 24 0 0 1 0 1 1 0 8 0 rtpcb 120 20 0 17 1 0 1 1 0 8 0 rtentry 112 23 0 1 1 0 1 1 0 8 0 unpcb 144 33 0 20 1 0 1 1 0 8 0 syncache 320 5 0 5 1 0 1 1 0 8 1 tcpqe 32 60 0 60 1 1 0 1 0 8 0 tcpcb 808 10 0 5 1 0 1 1 0 8 0 arp 120 2 0 0 1 0 1 1 0 8 0 inpcb 376 28 0 21 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 96 0 0 6 0 6 6 0 8 0 art_table 32 97 0 0 1 0 1 1 0 8 0 art_node 16 22 0 2 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1422 0 37 87 0 87 87 0 8 0 ffsino 272 1422 0 37 93 0 93 93 0 8 0 nchpl 144 1606 0 47 58 0 58 58 0 8 0 uvmvnodes 80 1431 0 0 30 0 30 30 0 8 0 vnodes 216 1431 0 0 80 0 80 80 0 8 0 namei 1024 4258 0 4258 1 0 1 1 0 8 1 percpumem 16 38 0 0 1 0 1 1 0 8 0 kstatmem 264 6 0 0 1 0 1 1 0 8 0 scxspl 216 5039 0 5039 3 1 2 2 1 8 2 plimitpl 152 17 0 10 1 0 1 1 0 8 0 sigapl 424 311 0 279 4 0 4 4 0 8 0 knotepl 120 43 0 0 2 0 2 2 0 8 0 kqueuepl 216 20 0 13 1 0 1 1 0 8 0 pipepl 320 87 0 84 1 0 1 1 0 8 0 fdescpl 496 293 0 279 3 1 2 3 0 8 0 filepl 152 1129 0 1075 3 0 3 3 0 8 0 lockfpl 104 6 0 4 1 0 1 1 0 8 0 lockfspl 48 4 0 2 1 0 1 1 0 8 0 sessionpl 144 18 0 9 1 0 1 1 0 8 0 pgrppl 48 18 0 9 1 0 1 1 0 8 0 ucredpl 104 69 0 58 1 0 1 1 0 8 0 zombiepl 144 279 0 279 1 0 1 1 0 8 1 processpl 1136 311 0 279 3 0 3 3 0 8 0 procpl 680 311 0 279 3 0 3 3 0 8 0 sockpl 488 81 0 58 3 0 3 3 0 8 0 mcl8k 8192 2 0 0 1 0 1 1 0 8 0 mcl4k 4096 4 0 0 1 0 1 1 0 8 0 mcl2k 2048 244 0 0 31 0 31 31 0 8 0 mtagpl 96 2 0 0 1 0 1 1 0 8 0 mbufpl 256 244 0 0 17 1 16 16 0 8 0 bufpl 288 2435 0 86 168 0 168 168 0 8 0 anonpl 24 153962 0 152103 24 2 22 23 0 186 10 amapchunkpl 152 8334 0 8187 7 0 7 7 0 158 1 amappl16 200 3691 0 3690 5 1 4 5 0 8 3 amappl15 192 7 0 7 1 1 0 1 0 8 0 amappl14 184 100 0 91 1 0 1 1 0 8 0 amappl13 176 12 0 12 1 1 0 1 0 8 0 amappl12 168 812 0 798 1 0 1 1 0 8 0 amappl11 160 53 0 43 1 0 1 1 0 8 0 amappl10 152 16 0 16 1 0 1 1 0 8 1 amappl9 144 88 0 88 1 0 1 1 0 8 1 amappl8 136 40 0 38 1 0 1 1 0 8 0 amappl7 128 80 0 70 1 0 1 1 0 8 0 amappl6 120 111 0 106 1 0 1 1 0 8 0 amappl5 112 101 0 91 1 0 1 1 0 8 0 amappl4 104 320 0 301 1 0 1 1 0 8 0 amappl3 96 2411 0 2377 1 0 1 1 0 8 0 amappl2 88 596 0 545 2 0 2 2 0 8 0 amappl1 80 8738 0 8314 11 0 11 11 0 8 1 amappl 88 2141 0 2088 2 0 2 2 0 92 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma1024 1024 1 0 0 1 0 1 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 72 2 0 0 1 0 1 1 0 8 0 uaddrrnd 24 293 0 279 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 293 0 279 1 0 1 1 0 8 0 vmmpekpl 168 6872 0 6856 1 0 1 1 0 8 0 vmmpepl 168 32537 0 31602 46 1 45 46 0 357 3 vmsppl 448 292 0 279 2 0 2 2 0 8 0 rwobjpl 56 17041 0 14989 32 2 30 31 0 8 0 pdppl 4096 593 0 558 51 16 35 41 0 8 0 pvpl 32 6311 0 0 51 0 51 51 0 265 0 pmappl 248 292 0 279 2 1 1 2 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 469 0 19 13 0 13 13 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x1e: addq $0x8,%rsp x86_ipi_db(ffffffff82d38ff0) at x86_ipi_db+0x1e sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27 __mp_lock(ffffffff82de4340) at __mp_lock+0x122 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff82de4340) at __mp_lock+0x122 sys/kern/kern_lock.c:147 softintr_dispatch(0) at softintr_dispatch+0x52 sys/arch/amd64/amd64/softintr.c:88 Xsoftclock() at Xsoftclock+0x27 __mp_lock(ffffffff82de4340) at __mp_lock+0x122 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff82de4340) at __mp_lock+0x122 sys/kern/kern_lock.c:147 if_qstart_compat(ffff8000001a0550) at if_qstart_compat+0x1e sys/net/if.c:716 ifq_serialize(ffff8000001a0550,ffff8000001a0678) at ifq_serialize+0x16e sys/net/ifq.c:113 taskq_thread(ffff80000002c000) at taskq_thread+0xe5 sys/kern/kern_task.c:450 end trace frame: 0x0, count: 5 ddb{0}> trace x86_ipi_db(ffffffff82d38ff0) at x86_ipi_db+0x1e sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27 __mp_lock(ffffffff82de4340) at __mp_lock+0x122 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff82de4340) at __mp_lock+0x122 sys/kern/kern_lock.c:147 softintr_dispatch(0) at softintr_dispatch+0x52 sys/arch/amd64/amd64/softintr.c:88 Xsoftclock() at Xsoftclock+0x27 __mp_lock(ffffffff82de4340) at __mp_lock+0x122 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff82de4340) at __mp_lock+0x122 sys/kern/kern_lock.c:147 if_qstart_compat(ffff8000001a0550) at if_qstart_compat+0x1e sys/net/if.c:716 ifq_serialize(ffff8000001a0550,ffff8000001a0678) at ifq_serialize+0x16e sys/net/ifq.c:113 taskq_thread(ffff80000002c000) at taskq_thread+0xe5 sys/kern/kern_task.c:450 end trace frame: 0x0, count: -10 ddb{0}> machine ddbcpu 1 Stopped at db_enter+0x1c: addq $0x8,%rsp db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82873283) at panic+0x17b sys/kern/subr_prf.c:198 __assert(ffffffff828f938f,ffffffff82868107,148,ffffffff829481fe) at __assert+0x29 sys/kern/subr_prf.c:157 in6_selectroute(ffff80002a1f01b0,ffff8000006d0680,fffffd80794b3368,0) at in6_selectroute+0x228 sys/netinet6/in6_src.c:328 ip6_output(fffffd806d4b5f00,ffff8000006d0680,fffffd80794b3368,0,0,fffffd80794b3428) at ip6_output+0xc6a sys/netinet6/ip6_output.c:467 tcp_output(ffff800000dac328) at tcp_output+0x2877 sys/netinet/tcp_output.c:1110 tcp_connect(fffffd80794c6b78,fffffd806d235800) at tcp_connect+0x33a sys/netinet/tcp_usrreq.c:670 sys_connect(ffff80002a199ab0,ffff80002a1f0650,ffff80002a1f05a0) at sys_connect+0x207 sys/kern/uipc_syscalls.c:422 syscall(ffff80002a1f0650) at syscall+0x5ae mi_syscall sys/sys/syscall_mi.h:183 [inline] syscall(ffff80002a1f0650) at syscall+0x5ae sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7ec5994aa6d0, count: 5 ddb{1}> trace db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82873283) at panic+0x17b sys/kern/subr_prf.c:198 __assert(ffffffff828f938f,ffffffff82868107,148,ffffffff829481fe) at __assert+0x29 sys/kern/subr_prf.c:157 in6_selectroute(ffff80002a1f01b0,ffff8000006d0680,fffffd80794b3368,0) at in6_selectroute+0x228 sys/netinet6/in6_src.c:328 ip6_output(fffffd806d4b5f00,ffff8000006d0680,fffffd80794b3368,0,0,fffffd80794b3428) at ip6_output+0xc6a sys/netinet6/ip6_output.c:467 tcp_output(ffff800000dac328) at tcp_output+0x2877 sys/netinet/tcp_output.c:1110 tcp_connect(fffffd80794c6b78,fffffd806d235800) at tcp_connect+0x33a sys/netinet/tcp_usrreq.c:670 sys_connect(ffff80002a199ab0,ffff80002a1f0650,ffff80002a1f05a0) at sys_connect+0x207 sys/kern/uipc_syscalls.c:422 syscall(ffff80002a1f0650) at syscall+0x5ae mi_syscall sys/sys/syscall_mi.h:183 [inline] syscall(ffff80002a1f0650) at syscall+0x5ae sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7ec5994aa6d0, count: -10 ddb{1}>