panic: ip6_getpcbopt: unexpected option Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 143674 4502 0 0 0 0 syz-executor *434727 4502 0 0 0x4000000 1 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83521df8) at panic+0x1e5 sys/kern/subr_prf.c:198 ip6_getpcbopt(ffff800001601f40,33,fffff7006ce02100) at ip6_getpcbopt+0x3e3 ip6_ctloutput(0,ffff800010fdb4a0,29,33,fffff7006ce02100) at ip6_ctloutput+0xfb2 sys/netinet6/ip6_output.c:1487 sogetopt(ffff800010fdb4a0,29,33,fffff7006ce02100) at sogetopt+0x128 sys/kern/uipc_socket.c:2074 sys_getsockopt(ffff807ffffee7e0,ffff80003c3ebbf0,ffff80003c3ebb40) at sys_getsockopt+0x1ec sys/kern/uipc_syscalls.c:1263 syscall(ffff80003c3ebbf0) at syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c3ebbf0) at syscall+0xbd4 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x5f8e049cd20, count: 7 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: ip6_getpcbopt: unexpected option ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83521df8) at panic+0x1e5 sys/kern/subr_prf.c:198 ip6_getpcbopt(ffff800001601f40,33,fffff7006ce02100) at ip6_getpcbopt+0x3e3 ip6_ctloutput(0,ffff800010fdb4a0,29,33,fffff7006ce02100) at ip6_ctloutput+0xfb2 sys/netinet6/ip6_output.c:1487 sogetopt(ffff800010fdb4a0,29,33,fffff7006ce02100) at sogetopt+0x128 sys/kern/uipc_socket.c:2074 sys_getsockopt(ffff807ffffee7e0,ffff80003c3ebbf0,ffff80003c3ebb40) at sys_getsockopt+0x1ec sys/kern/uipc_syscalls.c:1263 syscall(ffff80003c3ebbf0) at syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c3ebbf0) at syscall+0xbd4 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x5f8e049cd20, count: -8 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff80003c3eb850 rbx 0xffff80002998ee07 rdx 0xffff8000016013c0 rcx 0xffff807ffffee7e0 rax 0xffff80002998dff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x8a51f717c91bd7ac r11 0x4060af9cff51e336 r12 0xffff80002998ec08 r13 0 r14 0 r15 0x1 rip 0xffffffff821356f5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003c3eb840 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor) tid=434727 pid=4502 tcnt=2 stat=onproc flags process=0 proc=4000000 runpri=32, usrpri=50, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff807ffffee2b0,0xffff807ffffef250 process=0xffff80003bfc66a0 user=0xffff80003c3e6000, vmspace=0xfffff700661ea9a8 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 4502 143674 60762 0 7 0 syz-executor * 4502 434727 60762 0 7 0x4000000 syz-executor 3320 246244 7369 0 2 0 syz-executor 3320 140428 7369 0 3 0x4000080 fsleep syz-executor 67259 115219 33855 0 2 0 syz-executor 67259 251625 33855 0 3 0x4000080 fsleep syz-executor 15854 476773 82346 0 2 0 syz-executor 15854 99211 82346 0 3 0x4000080 fsleep syz-executor 61154 411057 66425 0 2 0 syz-executor 61154 61101 66425 0 3 0x4000080 fsleep syz-executor 85524 395103 38512 0 2 0 syz-executor 85524 300996 38512 0 3 0x4000080 kqsel syz-executor 85524 524115 38512 0 2 0x4000000 syz-executor 54285 171094 44209 60929 3 0x90 nanoslp syz-executor 54285 32697 44209 60929 3 0x4000090 msgwait syz-executor 54285 494770 44209 60929 3 0x4000090 fsleep syz-executor 1623 30926 51843 0 2 0 syz-executor 1623 54353 51843 0 3 0x4000080 fsleep syz-executor 1623 426048 51843 0 3 0x4000080 fsleep syz-executor 8810 149769 1 0 3 0x82 nanoslp getty 60762 35224 7892 0 3 0x82 nanoslp syz-executor 82346 317419 7892 0 3 0x82 nanoslp syz-executor 7369 28254 7892 0 3 0x82 nanoslp syz-executor 51843 319515 7892 0 3 0x82 nanoslp syz-executor 44209 405070 7892 0 3 0x82 nanoslp syz-executor 38512 169667 7892 0 3 0x82 nanoslp syz-executor 33855 506511 7892 0 3 0x82 nanoslp syz-executor 66425 387228 7892 0 3 0x82 nanoslp syz-executor 7892 214933 69925 0 3 0x82 kqread syz-executor 69925 163683 19680 0 3 0x10008a sigsusp ksh 19680 59685 29967 0 3 0x98 kqread sshd-session 29967 146663 99951 0 3 0x92 kqread sshd-session 99951 245125 1 0 3 0x88 kqread sshd 56711 488156 8871 74 3 0x1100092 bpf pflogd 8871 48019 1 0 3 0x80 sbwait pflogd 3035 168915 11532 73 3 0x1100090 kqread syslogd 11532 427346 1 0 3 0x100082 sbwait syslogd 92197 373205 1 0 3 0x100080 kqread resolvd 50258 313238 46465 77 3 0x100092 kqread dhcpleased 8807 482410 46465 77 3 0x100092 kqread dhcpleased 46465 36548 1 0 3 0x80 kqread dhcpleased 47318 378478 0 0 3 0x14200 pause smr 88189 74225 0 0 2 0x14200 zerothread 75199 360509 0 0 3 0x14200 aiodoned aiodoned 89921 255240 0 0 3 0x14200 syncer update 94144 98320 0 0 3 0x14200 cleaner cleaner 68405 323970 0 0 3 0x14200 reaper reaper 87383 70200 0 0 3 0x14200 pgdaemon pagedaemon 43480 237000 0 0 3 0x14200 bored viomb 85606 45863 0 0 3 0x40014200 acpi0 acpi0 79845 2798 0 0 3 0x40014200 idle1 80395 427283 0 0 3 0x14200 bored softnet1 97959 134248 0 0 3 0x14200 bored softnet0 74077 156164 0 0 3 0x14200 smrbar systqmp 79414 206596 0 0 3 0x14200 bored systq 63155 224613 0 0 3 0x14200 tmoslp softclockmp 40590 231164 0 0 3 0x40014200 tmoslp softclock 91003 235545 0 0 3 0x40014200 idle0 1 22640 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 4502 (syz-executor) thread 0xffff807ffffee7e0 (434727) exclusive rwlock netlock r = 0 (0xffffffff83974b30) #0 witness_lock+0x5f1 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5f1 sys/kern/subr_witness.c:1160 #1 rw_do_enter_write+0x419 sys/kern/kern_rwlock.c:320 #2 sogetopt+0x105 sys/kern/uipc_socket.c:2074 #3 sys_getsockopt+0x1ec sys/kern/uipc_syscalls.c:1263 #4 syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] #4 syscall+0xbd4 sys/arch/amd64/amd64/trap.c:783 #5 Xsyscall+0x128 Process 74077 (systqmp) thread 0xffff807fffffe7c8 (156164) shared rwlock systqmp r = 0 (0xffffffff83901338) #0 witness_lock+0x5f1 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5f1 sys/kern/subr_witness.c:1160 #1 taskq_thread+0x12a sys/kern/kern_task.c:442 #2 proc_trampoline+0x10 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 11052 12085K 12216K 166960K 12167 0 pcb 17 12K 12K 166960K 19 0 rtable 237 6K 7K 166960K 364 0 pf 34 17K 19K 166960K 48 0 ifaddr 43 7K 7K 166960K 46 0 ifgroup 55 2K 2K 166960K 57 0 sysctl 1 1K 9K 166960K 5 0 counters 70 37K 37K 166960K 72 0 ioctlops 0 0K 4K 166960K 1487 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1291 81K 81K 166960K 1373 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 3 0K 0K 166960K 3 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 18 65K 93K 166960K 184 0 sigio 0 0K 0K 166960K 2 0 proc 71 115K 163K 166960K 563 0 subproc 72 4K 4K 166960K 72 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 2 0 in_multi 99 7K 7K 166960K 101 0 ether_multi 1 0K 0K 166960K 1 0 mrt 0 0K 0K 166960K 3 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 31 148K 148K 166960K 31 0 exec 0 0K 1K 166960K 397 0 fusefs mount 1 32K 32K 166960K 1 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 239 159K 174K 166960K 3492 0 UVM aobj 3 2K 2K 166960K 3 0 pinsyscall 43 86K 106K 166960K 1374 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 1 0K 0K 166960K 1 0 NDP 27 2K 2K 166960K 29 0 temp 37 9114K 9123K 166960K 5328 0 kqueue 14 20K 24K 166960K 31 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 26 0 0 1 0 1 1 0 8 0 rtpcb 120 37 0 34 1 0 1 1 0 8 0 rtentry 176 114 0 4 6 0 6 6 0 8 0 unpcb 144 58 0 41 1 0 1 1 0 8 0 syncache 336 5 0 5 1 0 1 1 0 8 1 tcpcb 736 13 0 8 1 0 1 1 0 8 0 arp 136 19 0 1 1 0 1 1 0 8 0 inpcb 328 77 0 69 1 0 1 1 0 8 0 nd6 152 24 0 0 1 0 1 1 0 8 0 kcovpl 48 8 0 0 1 0 1 1 0 8 0 ppxss 1192 1 0 1 1 0 1 1 0 8 1 pfosfp 40 1428 0 1005 5 0 5 5 0 8 0 pfosfpen 112 1428 0 714 21 0 21 21 0 8 0 pfstitem 24 21 0 0 1 0 1 1 0 8 0 pfstkey 128 21 0 0 1 0 1 1 0 8 0 pfstate 448 21 0 0 3 0 3 3 0 8 0 pfrule 1360 21 0 16 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 459 0 0 29 0 29 29 0 8 0 art_table 40 460 0 0 5 0 5 5 0 8 0 art_node 32 114 0 12 1 0 1 1 0 8 0 semapl 72 1 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1627 0 157 93 0 93 93 0 8 1 ffsino 296 1627 0 157 114 0 114 114 0 8 0 nchpl 144 1874 0 174 64 0 64 64 0 8 0 vnodes 216 1723 0 0 96 0 96 96 0 8 0 namei 1024 5709 0 5709 2 0 2 2 0 8 2 percpumem 16 51 0 1 1 0 1 1 0 8 0 kstatmem 264 29 0 2 2 0 2 2 0 8 0 scxspl 216 6450 0 6450 4 2 2 3 1 8 2 plimitpl 152 30 0 13 1 0 1 1 0 8 0 sigapl 424 511 0 463 7 0 7 7 0 8 1 knotepl 120 300 0 0 10 0 10 10 0 8 0 kqueuepl 224 31 0 20 1 0 1 1 0 8 0 pipepl 344 132 0 104 3 0 3 3 0 8 0 fdescpl 528 495 0 463 3 0 3 3 0 8 0 filepl 160 1694 0 1482 10 0 10 10 0 8 0 lockfpl 104 17 0 15 1 0 1 1 0 8 0 lockfspl 48 9 0 7 1 0 1 1 0 8 0 sessionpl 144 24 0 16 1 0 1 1 0 8 0 pgrppl 48 32 0 16 1 0 1 1 0 8 0 ucredpl 104 95 0 81 1 0 1 1 0 8 0 zombiepl 144 463 0 463 1 0 1 1 0 8 1 processpl 1232 511 0 463 5 0 5 5 0 8 0 procpl 664 572 0 513 5 0 5 5 0 8 0 sockpl 752 172 0 144 4 0 4 4 0 8 1 mcl64k 65536 3 0 0 1 0 1 1 0 8 0 mcl16k 16384 5 0 0 1 0 1 1 0 8 0 mcl12k 12288 3 0 0 1 0 1 1 0 8 0 mcl9k128 9344 4 0 0 1 0 1 1 0 8 0 mcl8k 8192 4 0 0 1 0 1 1 0 8 0 mcl4k 4096 121 0 0 16 0 16 16 0 8 0 mcl2k 2048 19 0 0 3 0 3 3 0 8 0 mtagpl 96 4 0 0 1 0 1 1 0 8 0 mbufpl 256 140 0 0 9 0 9 9 0 8 0 bufpl 272 2460 0 105 157 0 157 157 0 8 0 anonpl 32 3698 0 0 30 0 30 30 0 115 0 amapchunkpl 152 9727 0 9229 25 0 25 25 0 158 5 amappl16 200 1585 0 1561 5 0 5 5 0 8 3 amappl15 192 4 0 4 1 0 1 1 0 8 1 amappl14 184 435 0 434 1 0 1 1 0 8 0 amappl13 176 196 0 183 1 0 1 1 0 8 0 amappl12 168 756 0 724 2 0 2 2 0 8 0 amappl11 160 6 0 6 1 0 1 1 0 8 1 amappl10 152 67 0 53 1 0 1 1 0 8 0 amappl9 144 273 0 273 1 0 1 1 0 8 1 amappl8 136 100 0 98 1 0 1 1 0 8 0 amappl7 128 154 0 141 1 0 1 1 0 8 0 amappl6 120 157 0 156 1 0 1 1 0 8 0 amappl5 112 115 0 105 1 0 1 1 0 8 0 amappl4 104 302 0 282 1 0 1 1 0 8 0 amappl3 96 1758 0 1641 3 0 3 3 0 8 0 amappl2 88 555 0 499 2 0 2 2 0 8 0 amappl1 80 10758 0 10149 15 0 15 15 0 8 2 amappl 88 2743 0 2575 4 0 4 4 0 92 0 uvmvnodes 80 101 0 0 3 0 3 3 0 8 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 495 0 463 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 495 0 463 1 0 1 1 0 8 0 vmmpekpl 168 6039 0 6002 2 0 2 2 0 8 0 vmmpepl 168 40694 0 38752 86 0 86 86 0 357 1 vmsppl 488 494 0 463 5 0 5 5 0 8 1 rwobjpl 80 14916 0 13889 24 0 24 24 0 8 2 pdppl 4096 997 0 926 99 16 83 85 0 8 12 pvpl 32 10097 0 0 82 0 82 82 0 265 0 pmappl 256 494 0 463 3 0 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 428 0 19 12 0 12 12 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x27: addq $0x8,%rsp x86_ipi_db(ffffffff838d6ff0) at x86_ipi_db+0x27 sys/arch/amd64/amd64/db_interface.c:394 x86_ipi_handler() at x86_ipi_handler+0xd9 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27 end of kernel end trace frame: 0x787a6390b2d0, count: 12 ddb{0}> trace x86_ipi_db(ffffffff838d6ff0) at x86_ipi_db+0x27 sys/arch/amd64/amd64/db_interface.c:394 x86_ipi_handler() at x86_ipi_handler+0xd9 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27 end of kernel end trace frame: 0x787a6390b2d0, count: -3 ddb{0}> machine ddbcpu 1 Stopped at db_enter+0x25: addq $0x8,%rsp db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83521df8) at panic+0x1e5 sys/kern/subr_prf.c:198 ip6_getpcbopt(ffff800001601f40,33,fffff7006ce02100) at ip6_getpcbopt+0x3e3 ip6_ctloutput(0,ffff800010fdb4a0,29,33,fffff7006ce02100) at ip6_ctloutput+0xfb2 sys/netinet6/ip6_output.c:1487 sogetopt(ffff800010fdb4a0,29,33,fffff7006ce02100) at sogetopt+0x128 sys/kern/uipc_socket.c:2074 sys_getsockopt(ffff807ffffee7e0,ffff80003c3ebbf0,ffff80003c3ebb40) at sys_getsockopt+0x1ec sys/kern/uipc_syscalls.c:1263 syscall(ffff80003c3ebbf0) at syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c3ebbf0) at syscall+0xbd4 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x5f8e049cd20, count: 7 ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83521df8) at panic+0x1e5 sys/kern/subr_prf.c:198 ip6_getpcbopt(ffff800001601f40,33,fffff7006ce02100) at ip6_getpcbopt+0x3e3 ip6_ctloutput(0,ffff800010fdb4a0,29,33,fffff7006ce02100) at ip6_ctloutput+0xfb2 sys/netinet6/ip6_output.c:1487 sogetopt(ffff800010fdb4a0,29,33,fffff7006ce02100) at sogetopt+0x128 sys/kern/uipc_socket.c:2074 sys_getsockopt(ffff807ffffee7e0,ffff80003c3ebbf0,ffff80003c3ebb40) at sys_getsockopt+0x1ec sys/kern/uipc_syscalls.c:1263 syscall(ffff80003c3ebbf0) at syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c3ebbf0) at syscall+0xbd4 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x5f8e049cd20, count: -8