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 *503007 6397 32767 0x10 0x4000000 0 syz-executor.4 32377 45907 32767 0x10 0 1 syz-executor.2 db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff8287606f) at panic+0x17b sys/kern/subr_prf.c:198 __assert(ffffffff828f80a1,ffffffff8286a976,148,ffffffff8294a7ee) at __assert+0x29 sys/kern/subr_prf.c:157 in6_selectroute(ffff80002f91e9c0,ffff800000ee0700,fffffd8067b5c288,0) at in6_selectroute+0x228 sys/netinet6/in6_src.c:328 ip6_output(fffffd8064cdf100,ffff800000ee0700,fffffd8067b5c288,0,0,fffffd8067b5c348) at ip6_output+0xc6a sys/netinet6/ip6_output.c:467 tcp_output(ffff800000e56ca8) at tcp_output+0x2877 sys/netinet/tcp_output.c:1110 tcp_connect(fffffd8066fcebb0,fffffd80693af700) at tcp_connect+0x33a sys/netinet/tcp_usrreq.c:670 sys_connect(ffff80002bc7c7e8,ffff80002f91ee60,ffff80002f91edb0) at sys_connect+0x207 sys/kern/uipc_syscalls.c:422 syscall(ffff80002f91ee60) at syscall+0x5ae mi_syscall sys/sys/syscall_mi.h:183 [inline] syscall(ffff80002f91ee60) at syscall+0x5ae sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xb397f4a5eb0, 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{0}> ddb{0}> set $lines = 0 ddb{0}> set $maxwidth = 0 ddb{0}> show panic *cpu0: 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{0}> trace db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff8287606f) at panic+0x17b sys/kern/subr_prf.c:198 __assert(ffffffff828f80a1,ffffffff8286a976,148,ffffffff8294a7ee) at __assert+0x29 sys/kern/subr_prf.c:157 in6_selectroute(ffff80002f91e9c0,ffff800000ee0700,fffffd8067b5c288,0) at in6_selectroute+0x228 sys/netinet6/in6_src.c:328 ip6_output(fffffd8064cdf100,ffff800000ee0700,fffffd8067b5c288,0,0,fffffd8067b5c348) at ip6_output+0xc6a sys/netinet6/ip6_output.c:467 tcp_output(ffff800000e56ca8) at tcp_output+0x2877 sys/netinet/tcp_output.c:1110 tcp_connect(fffffd8066fcebb0,fffffd80693af700) at tcp_connect+0x33a sys/netinet/tcp_usrreq.c:670 sys_connect(ffff80002bc7c7e8,ffff80002f91ee60,ffff80002f91edb0) at sys_connect+0x207 sys/kern/uipc_syscalls.c:422 syscall(ffff80002f91ee60) at syscall+0x5ae mi_syscall sys/sys/syscall_mi.h:183 [inline] syscall(ffff80002f91ee60) at syscall+0x5ae sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xb397f4a5eb0, count: -10 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff80002f91e800 rbx 0xffffffff82cc9ca7 cpu_info_full_primary+0x2ca7 rdx 0xffff800000ddeb40 rcx 0xffff80002bc7c7e8 rax 0xffffffff82cc8ff0 cpu_info_full_primary+0x1ff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x94ced1be28305906 r11 0x2854424b015a89c1 r12 0xffffffff82cc9aa8 cpu_info_full_primary+0x2aa8 r13 0 r14 0 r15 0x1 rip 0xffffffff8182182c db_enter+0x1c cs 0x8 rflags 0x246 rsp 0xffff80002f91e7f0 ss 0x10 db_enter+0x1c: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.4) tid=503007 pid=6397 tcnt=2 stat=onproc flags process=10 proc=4000000 runpri=32, usrpri=86, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 forw=0xffffffffffffffff, list=0xffff80002bc7ca90,0xffffffff82e33f90 process=0xffff8000ffff70e0 user=0xffff80002f919000, vmspace=0xfffffd8065a183a8 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 49848 110849 71287 32767 2 0x10 syz-executor.0 49848 196795 71287 32767 3 0x4000090 fifow syz-executor.0 6397 52380 3353 32767 2 0x10 syz-executor.4 * 6397 503007 3353 32767 7 0x4000010 syz-executor.4 49963 40181 45907 32767 3 0x90 nanoslp syz-executor.2 49963 3800 45907 32767 3 0x4000090 netio syz-executor.2 83835 494310 98021 32767 3 0x90 piperd syz-executor.1 98021 232534 12381 0 3 0x82 wait syz-executor.1 5080 20465 1381 32767 3 0x90 piperd syz-executor.3 1381 64891 12381 0 3 0x82 wait syz-executor.3 45907 32377 90654 32767 7 0x10 syz-executor.2 90654 52977 12381 0 3 0x82 wait syz-executor.2 38025 491443 19270 32767 3 0x90 piperd syz-executor.6 19270 425431 12381 0 3 0x82 wait syz-executor.6 46994 73575 61372 32767 3 0x90 piperd syz-executor.7 61372 460394 12381 0 3 0x82 wait syz-executor.7 3353 193820 42344 32767 3 0x90 nanoslp syz-executor.4 42344 363139 12381 0 3 0x82 wait syz-executor.4 56329 154070 0 0 3 0x14200 bored sosplice 57368 311750 58246 32767 3 0x90 piperd syz-executor.5 58246 479056 12381 0 3 0x82 wait syz-executor.5 71287 55157 97782 32767 3 0x90 nanoslp syz-executor.0 97782 22938 12381 0 3 0x82 wait syz-executor.0 12381 114891 12468 0 3 0x2000082 wait syz-fuzzer 12381 516156 12468 0 3 0x6000082 thrsleep syz-fuzzer 12381 516121 12468 0 3 0x6000082 thrsleep syz-fuzzer 12381 100422 12468 0 3 0x6000082 thrsleep syz-fuzzer 12381 97901 12468 0 3 0x6000082 wait syz-fuzzer 12381 446110 12468 0 3 0x6000082 kqread syz-fuzzer 12381 55439 12468 0 3 0x6000082 wait syz-fuzzer 12381 69382 12468 0 3 0x6000082 wait syz-fuzzer 12381 27228 12468 0 3 0x6000082 thrsleep syz-fuzzer 12381 170070 12468 0 3 0x6000082 thrsleep syz-fuzzer 12381 74603 12468 0 3 0x6000082 wait syz-fuzzer 12381 264037 12468 0 3 0x6000082 thrsleep syz-fuzzer 12381 522890 12468 0 3 0x6000082 wait syz-fuzzer 12381 259390 12468 0 3 0x6000082 wait syz-fuzzer 12381 501706 12468 0 3 0x6000082 wait syz-fuzzer 12381 219986 12468 0 3 0x6000082 thrsleep syz-fuzzer 12468 489505 75335 0 3 0x10008a sigsusp ksh 75335 367361 13747 0 3 0x9a kqread sshd 9813 251456 1 0 3 0x100083 ttyin getty 13747 156945 1 0 3 0x88 kqread sshd 80814 112671 16255 73 3 0x1100090 kqread syslogd 16255 305488 1 0 3 0x100082 netio syslogd 11153 313171 1 0 3 0x100080 kqread resolvd 25236 33568 6911 77 3 0x100092 kqread dhcpleased 91501 62707 6911 77 3 0x100092 kqread dhcpleased 6911 454217 1 0 3 0x80 kqread dhcpleased 63151 275430 0 0 3 0x14200 bored smr 63193 248921 0 0 2 0x14200 zerothread 88063 359316 0 0 3 0x14200 aiodoned aiodoned 5485 375141 0 0 3 0x14200 syncer update 11628 152396 0 0 3 0x14200 cleaner cleaner 84899 26514 0 0 3 0x14200 reaper reaper 33992 433669 0 0 3 0x14200 pgdaemon pagedaemon 96039 263922 0 0 3 0x14200 bored viomb 45920 268577 0 0 3 0x40014200 acpi0 acpi0 1341 394108 0 0 3 0x40014200 idle1 41334 216597 0 0 3 0x14200 bored softnet3 54838 517403 0 0 3 0x14200 bored softnet2 37989 444979 0 0 3 0x14200 bored softnet1 64581 3443 0 0 3 0x14200 bored softnet0 21003 280426 0 0 3 0x14200 bored systqmp 74453 267764 0 0 3 0x14200 bored systq 23704 52747 0 0 3 0x14200 tmoslp softclockmp 25649 98255 0 0 2 0x40014200 softclock 55516 154941 0 0 3 0x40014200 idle0 1 353512 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 6397 (syz-executor.4) thread 0xffff80002bc7c7e8 (503007) exclusive rwlock netlock r = 0 (0xffffffff82caa410) #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{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10207 6412K 6419K 166960K 11329 0 pcb 15 16K 18K 166960K 21 0 rtable 250 7K 7K 166960K 1759 0 pf 29 8K 8K 166960K 57 0 ifaddr 44 15K 15K 166960K 104 0 ifgroup 50 2K 2K 166960K 106 0 sysctl 4 1K 1K 166960K 4 0 counters 64 36K 36K 166960K 92 0 ioctlops 0 0K 2K 166960K 268 0 iov 0 0K 28K 166960K 2655 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1280 80K 80K 166960K 3140 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 9K 166960K 229 0 VM map 2 1K 1K 166960K 2 0 sem 11 1K 1K 166960K 15 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1697 195K 286K 166960K 12548 0 file desc 21 77K 117K 166960K 13995 0 sigio 0 0K 0K 166960K 418 0 proc 56 78K 115K 166960K 1513 0 subproc 104 6K 6K 166960K 286 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 1252 0 in_multi 99 7K 7K 166960K 409 0 ether_multi 1 0K 0K 166960K 20 0 mrt 1 0K 0K 166960K 1 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 223 996K 996K 166960K 223 0 exec 0 0K 1K 166960K 1736 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 418 94K 108K 166960K 139799 0 UVM aobj 131 4K 7K 166960K 151 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 2 0K 0K 166960K 401 0 NDP 11 0K 2K 166960K 69 0 temp 74 6712K 6778K 166960K 36064 0 kqueue 12 18K 31K 166960K 1357 0 SYN cache 2 16K 16K 166960K 2 0 ddb{0}> 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 1149 0 1146 15 14 1 5 0 8 0 rtentry 112 283 0 165 4 0 4 4 0 8 0 unpcb 144 10538 0 10521 88 84 4 6 0 8 3 syncache 320 206 0 206 22 21 1 1 0 8 1 sackhl 24 1 0 1 1 1 0 1 0 8 0 tcpqe 32 345 0 345 26 25 1 1 0 8 1 tcpcb 808 8777 0 8720 137 124 13 18 0 8 5 arp 120 49 0 30 1 0 1 1 0 8 0 ipq 40 81 0 79 5 4 1 1 0 8 0 ipqe 40 418 0 416 5 4 1 1 0 8 0 inpcb 376 16157 0 16091 171 157 14 22 0 8 4 nd6 136 81 0 50 2 0 2 2 0 8 0 kcovpl 48 22 0 14 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 1133 0 652 32 1 31 31 0 8 0 art_table 32 1134 0 652 4 0 4 4 0 8 0 art_node 16 282 0 174 1 0 1 1 0 8 0 sysvmsgpl 40 3 0 3 1 1 0 1 0 8 0 semupl 112 4 0 4 1 1 0 1 0 8 0 semapl 112 9 0 0 1 0 1 1 0 8 0 shmpl 112 148 0 20 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 18996 0 17548 91 0 91 91 0 8 0 ffsino 272 18996 0 17548 98 0 98 98 0 8 0 nchpl 144 37322 0 35682 63 0 63 63 0 8 0 uvmvnodes 80 5926 0 0 121 0 121 121 0 8 0 vnodes 216 5926 0 0 330 0 330 330 0 8 0 namei 1024 117503 0 117503 4 3 1 2 0 8 1 percpumem 16 60 0 14 1 0 1 1 0 8 0 kstatmem 264 50 0 28 2 0 2 2 0 8 0 scxspl 216 114810 0 114810 47 46 1 8 1 8 1 plimitpl 152 2071 0 2047 19 17 2 2 0 8 1 sigapl 424 14262 0 14211 7 0 7 7 0 8 0 futexpl 64 129592 0 129592 1 0 1 1 0 8 1 knotepl 120 775 0 0 11 0 11 11 0 8 0 kqueuepl 216 3594 0 3586 51 46 5 8 0 8 4 pipepl 320 2916 0 2888 66 55 11 14 0 8 8 fdescpl 496 14243 0 14211 7 2 5 6 0 8 0 filepl 152 84732 0 84492 145 126 19 25 0 8 7 lockfpl 104 1708 0 1706 1 0 1 1 0 8 0 lockfspl 48 553 0 551 1 0 1 1 0 8 0 sessionpl 144 37 0 21 1 0 1 1 0 8 0 pgrppl 48 239 0 223 1 0 1 1 0 8 0 ucredpl 104 11472 0 11454 1 0 1 1 0 8 0 zombiepl 144 14211 0 14211 1 0 1 1 0 8 1 processpl 1136 14262 0 14211 5 0 5 5 0 8 0 procpl 680 39533 0 39464 10 2 8 9 0 8 0 sosppl 168 258 0 255 9 8 1 1 0 8 0 sockpl 488 29444 0 29364 397 378 19 35 0 8 5 mcl64k 65536 41 0 0 4 1 3 3 0 8 0 mcl16k 16384 18 0 0 3 0 3 3 0 8 0 mcl12k 12288 17 0 0 2 0 2 2 0 8 0 mcl9k 9216 14 0 0 1 0 1 1 0 8 0 mcl8k 8192 33 0 0 3 0 3 3 0 8 0 mcl4k 4096 63 0 0 3 0 3 3 0 8 0 mcl2k2 2112 17 0 0 2 0 2 2 0 8 0 mcl2k 2048 444 0 0 37 17 20 37 0 8 0 mtagpl 96 17 0 0 1 0 1 1 0 8 0 mbufpl 256 1380 0 0 67 0 67 67 0 8 0 bufpl 288 26953 0 20635 452 0 452 452 0 8 0 anonpl 24 1552718 0 1540434 201 106 95 103 0 186 0 amapchunkpl 152 444702 0 443857 84 43 41 47 0 158 0 amappl16 200 34899 0 34572 187 168 19 32 0 8 0 amappl15 192 18 0 16 1 0 1 1 0 8 0 amappl14 184 208 0 195 2 1 1 2 0 8 0 amappl13 176 57 0 56 1 0 1 1 0 8 0 amappl12 168 15100 0 15065 2 0 2 2 0 8 0 amappl11 160 63 0 52 1 0 1 1 0 8 0 amappl10 152 43 0 30 1 0 1 1 0 8 0 amappl9 144 316 0 316 16 15 1 1 0 8 1 amappl8 136 761 0 616 6 0 6 6 0 8 0 amappl7 128 271 0 245 2 0 2 2 0 8 0 amappl6 120 638 0 623 1 0 1 1 0 8 0 amappl5 112 387 0 379 1 0 1 1 0 8 0 amappl4 104 715 0 684 2 1 1 2 0 8 0 amappl3 96 86288 0 86200 9 5 4 4 0 8 0 amappl2 88 15422 0 15346 3 1 2 3 0 8 0 amappl1 80 59061 0 58542 22 10 12 22 0 8 0 amappl 88 138658 0 138416 8 1 7 8 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 150 0 20 3 0 3 3 0 8 0 uaddrrnd 24 14243 0 14211 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 14243 0 14211 1 0 1 1 0 8 0 vmmpekpl 168 115222 0 115165 3 0 3 3 0 8 0 vmmpepl 168 835365 0 833018 280 163 117 136 0 357 1 vmsppl 448 14242 0 14211 6 1 5 5 0 8 0 rwobjpl 56 216230 0 208765 114 4 110 110 0 8 0 pdppl 4096 28493 0 28422 377 298 79 91 0 8 8 pvpl 32 44333 0 0 358 0 358 358 0 265 0 pmappl 248 14242 0 14211 4 1 3 3 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 1331 0 449 26 0 26 26 0 8 0 ddb{0}> machine ddbcpu 0 Invalid cpu 0 ddb{0}> trace db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff8287606f) at panic+0x17b sys/kern/subr_prf.c:198 __assert(ffffffff828f80a1,ffffffff8286a976,148,ffffffff8294a7ee) at __assert+0x29 sys/kern/subr_prf.c:157 in6_selectroute(ffff80002f91e9c0,ffff800000ee0700,fffffd8067b5c288,0) at in6_selectroute+0x228 sys/netinet6/in6_src.c:328 ip6_output(fffffd8064cdf100,ffff800000ee0700,fffffd8067b5c288,0,0,fffffd8067b5c348) at ip6_output+0xc6a sys/netinet6/ip6_output.c:467 tcp_output(ffff800000e56ca8) at tcp_output+0x2877 sys/netinet/tcp_output.c:1110 tcp_connect(fffffd8066fcebb0,fffffd80693af700) at tcp_connect+0x33a sys/netinet/tcp_usrreq.c:670 sys_connect(ffff80002bc7c7e8,ffff80002f91ee60,ffff80002f91edb0) at sys_connect+0x207 sys/kern/uipc_syscalls.c:422 syscall(ffff80002f91ee60) at syscall+0x5ae mi_syscall sys/sys/syscall_mi.h:183 [inline] syscall(ffff80002f91ee60) at syscall+0x5ae sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xb397f4a5eb0, count: -10 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x1e: addq $0x8,%rsp x86_ipi_db(ffff800029cfbff0) 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(ffffffff82e674d8) at __mp_lock+0x122 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff82e674d8) at __mp_lock+0x122 sys/kern/kern_lock.c:147 syscall(ffff80002f0a8650) at syscall+0x51a mi_syscall sys/sys/syscall_mi.h:183 [inline] syscall(ffff80002f0a8650) at syscall+0x51a sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x716639d45640, count: 9 ddb{1}> trace x86_ipi_db(ffff800029cfbff0) 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(ffffffff82e674d8) at __mp_lock+0x122 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff82e674d8) at __mp_lock+0x122 sys/kern/kern_lock.c:147 syscall(ffff80002f0a8650) at syscall+0x51a mi_syscall sys/sys/syscall_mi.h:183 [inline] syscall(ffff80002f0a8650) at syscall+0x51a sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x716639d45640, count: -6