panic: syn_cache_insert: bucketoverflow: impossible Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 463284 65868 0 0 0 1 syz-executor.0 *210205 92420 0 0x14000 0x200 0 softnet db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff823c78eb) at panic+0x15c sys/kern/subr_prf.c:207 syn_cache_insert(fffffd8064992e78,ffff800000ad6cc0) at syn_cache_insert+0x9d4 sys/netinet/tcp_input.c:3235 syn_cache_add(ffff800020db8be0,ffff800020db8b90,fffffd80770b60c4,14,fffffd806b0634c8,fffffd80770b6000) at syn_cache_add+0x6e9 tcpstat_inc sys/netinet/tcp_var.h:645 [inline] syn_cache_add(ffff800020db8be0,ffff800020db8b90,fffffd80770b60c4,14,fffffd806b0634c8,fffffd80770b6000) at syn_cache_add+0x6e9 sys/netinet/tcp_input.c:3871 tcp_input(ffff800020db8ed8,ffff800020db8ee4,6,2) at tcp_input+0x3c67 sys/netinet/tcp_input.c:830 ip_deliver(ffff800020db8ed8,ffff800020db8ee4,6,2) at ip_deliver+0x353 sys/netinet/ip_input.c:668 ip_ours(ffff800020db8ed8,ffff800020db8ee4,ffff800020d984e0,0) at ip_ours+0x412 ip_input_if(ffff800020db8ed8,ffff800020db8ee4,4,0,ffff80000067a800) at ip_input_if+0x6ce ipv4_input(ffff80000067a800,fffffd80770b6000) at ipv4_input+0x48 sys/netinet/ip_input.c:215 if_input_local(ffff80000067a800,fffffd80770b6000,2) at if_input_local+0xf9 sys/net/if.c:775 loinput(ffff80000067a800,fffffd80770b6000,0) at loinput+0x4f sys/net/if_loop.c:239 if_input_process(ffff80000067a800,ffff800020db9048) at if_input_process+0x10b if_ih_input sys/net/if.c:908 [inline] if_input_process(ffff80000067a800,ffff800020db9048) at if_input_process+0x10b sys/net/if.c:942 ifiq_process(ffff80000067abf8) at ifiq_process+0x80 sys/net/ifq.c:646 taskq_thread(ffff80000002c000) at taskq_thread+0xec sys/kern/kern_task.c:437 end trace frame: 0x0, count: 1 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 syn_cache_insert: bucketoverflow: impossible ddb{0}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff823c78eb) at panic+0x15c sys/kern/subr_prf.c:207 syn_cache_insert(fffffd8064992e78,ffff800000ad6cc0) at syn_cache_insert+0x9d4 sys/netinet/tcp_input.c:3235 syn_cache_add(ffff800020db8be0,ffff800020db8b90,fffffd80770b60c4,14,fffffd806b0634c8,fffffd80770b6000) at syn_cache_add+0x6e9 tcpstat_inc sys/netinet/tcp_var.h:645 [inline] syn_cache_add(ffff800020db8be0,ffff800020db8b90,fffffd80770b60c4,14,fffffd806b0634c8,fffffd80770b6000) at syn_cache_add+0x6e9 sys/netinet/tcp_input.c:3871 tcp_input(ffff800020db8ed8,ffff800020db8ee4,6,2) at tcp_input+0x3c67 sys/netinet/tcp_input.c:830 ip_deliver(ffff800020db8ed8,ffff800020db8ee4,6,2) at ip_deliver+0x353 sys/netinet/ip_input.c:668 ip_ours(ffff800020db8ed8,ffff800020db8ee4,ffff800020d984e0,0) at ip_ours+0x412 ip_input_if(ffff800020db8ed8,ffff800020db8ee4,4,0,ffff80000067a800) at ip_input_if+0x6ce ipv4_input(ffff80000067a800,fffffd80770b6000) at ipv4_input+0x48 sys/netinet/ip_input.c:215 if_input_local(ffff80000067a800,fffffd80770b6000,2) at if_input_local+0xf9 sys/net/if.c:775 loinput(ffff80000067a800,fffffd80770b6000,0) at loinput+0x4f sys/net/if_loop.c:239 if_input_process(ffff80000067a800,ffff800020db9048) at if_input_process+0x10b if_ih_input sys/net/if.c:908 [inline] if_input_process(ffff80000067a800,ffff800020db9048) at if_input_process+0x10b sys/net/if.c:942 ifiq_process(ffff80000067abf8) at ifiq_process+0x80 sys/net/ifq.c:646 taskq_thread(ffff80000002c000) at taskq_thread+0xec sys/kern/kern_task.c:437 end trace frame: 0x0, count: -14 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800020db8760 rbx 0xffff800020db8810 rdx 0x8b rcx 0x2 rax 0x1 r8 0xffffffff819bd72f kprintf+0x16f r9 0x1 r10 0x2 r11 0xe5b38b3eeea83483 r12 0x3000000008 r13 0xffff800020db8770 r14 0x100 r15 0x1 rip 0xffffffff816af6b8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020db8750 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (softnet) pid=210205 stat=onproc flags process=14000 proc=200 pri=32, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff800020d989c0,0xffff800020d98280 process=0xffff800020d9ab88 user=0xffff800020db4000, vmspace=0xffffffff828ba618 estcpu=0, cpticks=0, pctcpu=0.19 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 65868 463284 52883 0 7 0 syz-executor.0 65868 123936 52883 0 3 0x4000080 netcon2 syz-executor.0 18837 379792 0 0 3 0x14200 bored sosplice 60318 447611 0 0 3 0x14200 acct acct 79340 19715 55228 0 3 0x82 nanosleep syz-executor.1 52883 145019 55228 0 3 0x82 nanosleep syz-executor.0 55228 508626 32957 0 3 0x82 thrsleep syz-fuzzer 55228 368074 32957 0 3 0x4000082 nanosleep syz-fuzzer 55228 517290 32957 0 3 0x4000082 thrsleep syz-fuzzer 55228 31888 32957 0 3 0x4000082 kqread syz-fuzzer 55228 38489 32957 0 3 0x4000082 thrsleep syz-fuzzer 55228 513321 32957 0 3 0x4000082 thrsleep syz-fuzzer 55228 237265 32957 0 3 0x4000082 thrsleep syz-fuzzer 55228 212186 32957 0 3 0x4000082 thrsleep syz-fuzzer 55228 77368 32957 0 3 0x4000082 thrsleep syz-fuzzer 55228 78053 32957 0 3 0x4000082 nanosleep syz-fuzzer 32957 240523 95100 0 3 0x10008a pause ksh 95100 212419 89028 0 3 0x92 select sshd 3456 152273 1 0 3 0x100083 ttyin getty 89028 204061 1 0 3 0x80 select sshd 2465 233446 78532 74 3 0x100092 bpf pflogd 78532 373279 1 0 3 0x80 netio pflogd 91598 367615 70436 73 3 0x100090 kqread syslogd 70436 296282 1 0 3 0x100082 netio syslogd 91010 405017 1 77 3 0x100090 poll dhclient 81399 161440 1 0 3 0x80 poll dhclient 44184 37029 0 0 3 0x14200 bored smr 94447 148385 0 0 3 0x14200 pgzero zerothread 98753 383681 0 0 3 0x14200 aiodoned aiodoned 21145 391636 0 0 3 0x14200 syncer update 74376 264539 0 0 3 0x14200 cleaner cleaner 81838 439445 0 0 3 0x14200 reaper reaper 87083 353885 0 0 3 0x14200 pgdaemon pagedaemon 21962 106088 0 0 3 0x14200 bored crynlk 35849 383053 0 0 3 0x14200 bored crypto 37509 329483 0 0 3 0x40014200 acpi0 acpi0 91694 245530 0 0 3 0x40014200 idle1 *92420 210205 0 0 7 0x14200 softnet 8147 457642 0 0 3 0x14200 bored systqmp 78752 25057 0 0 3 0x14200 bored systq 91664 112131 0 0 3 0x40014200 bored softclock 81978 489299 0 0 3 0x40014200 idle0 1 403343 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 92420 (softnet) thread 0xffff800020d984e0 (210205) exclusive rwlock netlock r = 0 (0xffffffff82735868) #0 witness_lock+0x4c7 stacktrace_save sys/sys/stacktrace.h:36 [inline] #0 witness_lock+0x4c7 sys/kern/subr_witness.c:1164 #1 if_input_process+0x85 sys/net/if.c:941 #2 ifiq_process+0x80 sys/net/ifq.c:646 #3 taskq_thread+0xec sys/kern/kern_task.c:437 #4 proc_trampoline+0x1c shared rwlock softnet r = 0 (0xffff80000002c070) #0 witness_lock+0x4c7 stacktrace_save sys/sys/stacktrace.h:36 [inline] #0 witness_lock+0x4c7 sys/kern/subr_witness.c:1164 #1 taskq_thread+0xdf sys/kern/kern_task.c:436 #2 proc_trampoline+0x1c ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 9502 6419K 7063K 78643K 10887 0 pcb 13 8K 8K 78643K 57 0 rtable 109 4K 7K 78643K 255 0 ifaddr 60 12K 13K 78643K 76 0 sysctl 2 0K 0K 78643K 2 0 counters 45 34K 34K 78643K 45 0 ioctlops 0 0K 4K 78643K 1481 0 iov 0 0K 32K 78643K 20 0 mount 1 1K 1K 78643K 1 0 vnodes 1225 77K 77K 78643K 1343 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 3 0 VM map 2 1K 1K 78643K 2 0 sem 12 0K 0K 78643K 47 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1824 197K 290K 78643K 13058 0 file desc 6 17K 25K 78643K 156 0 sigio 0 0K 0K 78643K 4 0 proc 60 63K 95K 78643K 459 0 subproc 32 2K 2K 78643K 34 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 2 0 in_multi 40 2K 2K 78643K 44 0 ether_multi 1 0K 0K 78643K 3 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 221 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 119 38K 39K 78643K 1441 0 UVM aobj 14 4K 4K 78643K 14 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 1K 78643K 35 0 NDP 9 0K 0K 78643K 13 0 temp 84 3845K 3909K 78643K 23381 0 kqueue 3 4K 10K 78643K 12 0 SYN cache 2 16K 16K 78643K 2 0 ddb{0}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 6 0 0 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 27 0 25 1 0 1 1 0 8 0 rtentry 112 45 0 1 2 0 2 2 0 8 0 unpcb 120 89 0 75 1 0 1 1 0 8 0 syncache 264 5 0 4 2 1 1 1 0 8 0 tcpqe 32 14 0 14 1 1 0 1 0 8 0 tcpcb 544 74 0 68 1 0 1 1 0 8 0 inpcb 280 214 0 205 2 1 1 2 0 8 0 nd6 48 6 0 0 1 0 1 1 0 8 0 pkpcb 40 4 0 4 1 1 0 1 0 8 0 pffrent 40 1 0 1 1 1 0 1 0 8 0 pfosfp 40 846 0 423 5 0 5 5 0 8 0 pfosfpen 112 1428 0 714 21 0 21 21 0 8 0 pfrktable 1344 14 0 14 1 1 0 1 0 8 0 pfstitem 24 22 0 6 1 0 1 1 0 8 0 pfstkey 112 22 0 6 1 0 1 1 0 8 0 pfstate 328 22 0 5 2 0 2 2 0 8 0 pfrule 1360 25 0 20 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 188 0 0 12 0 12 12 0 8 0 art_table 32 189 0 0 2 0 2 2 0 8 0 art_node 16 44 0 4 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 38 0 28 1 0 1 1 0 8 0 shmpl 112 12 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1644 0 237 89 0 89 89 0 8 0 ffsino 272 1644 0 237 96 1 95 95 0 8 0 nchpl 144 2042 0 430 60 0 60 60 0 8 0 uvmvnodes 72 1760 0 0 32 0 32 32 0 8 0 vnodes 208 1760 0 0 93 0 93 93 0 8 0 namei 1024 5927 0 5927 1 0 1 1 0 8 1 percpumem 16 33 0 0 1 0 1 1 0 8 0 vcpupl 1984 2 0 0 1 0 1 1 0 8 0 vmpool 560 2 0 0 1 0 1 1 0 8 0 pfiaddrpl 120 4 0 4 1 1 0 1 0 8 0 scxspl 192 6296 0 6296 10 7 3 7 0 8 3 plimitpl 152 25 0 17 1 0 1 1 0 8 0 sigapl 424 373 0 339 4 0 4 4 0 8 0 futexpl 56 2142 0 2142 1 0 1 1 0 8 1 knotepl 112 71 0 52 1 0 1 1 0 8 0 kqueuepl 144 27 0 25 1 0 1 1 0 8 0 pipelkpl 48 93 0 83 1 0 1 1 0 8 0 pipepl 120 186 0 167 1 0 1 1 0 8 0 fdescpl 496 356 0 339 3 0 3 3 0 8 0 filepl 152 2323 0 2205 6 1 5 5 0 8 0 lockfpl 104 48 0 47 1 0 1 1 0 8 0 lockfspl 48 19 0 18 1 0 1 1 0 8 0 sessionpl 112 18 0 7 1 0 1 1 0 8 0 pgrppl 48 18 0 7 1 0 1 1 0 8 0 ucredpl 96 509 0 500 1 0 1 1 0 8 0 zombiepl 144 340 0 339 1 0 1 1 0 8 0 processpl 984 373 0 339 6 1 5 5 0 8 0 procpl 624 678 0 634 4 0 4 4 0 8 0 sockpl 400 334 0 309 4 1 3 3 0 8 0 mcl64k 65536 3 0 0 1 0 1 1 0 8 0 mcl12k 12288 1 0 0 1 0 1 1 0 8 0 mcl9k 9216 2 0 0 1 0 1 1 0 8 0 mcl8k 8192 1 0 0 1 0 1 1 0 8 0 mcl4k 4096 3 0 0 1 0 1 1 0 8 0 mcl2k2 2112 1 0 0 1 0 1 1 0 8 0 mcl2k 2048 178 0 0 22 0 22 22 0 8 0 mtagpl 80 16 0 0 1 0 1 1 0 8 0 mbufpl 256 182 0 0 11 0 11 11 0 8 0 bufpl 280 3918 0 133 271 0 271 271 0 8 0 anonpl 16 45724 0 30987 62 1 61 61 0 124 1 amapchunkpl 152 1932 0 1794 11 5 6 11 0 158 0 amappl16 192 1425 0 626 41 0 41 41 0 8 1 amappl15 184 75 0 72 1 0 1 1 0 8 0 amappl14 176 31 0 25 1 0 1 1 0 8 0 amappl13 168 28 0 25 1 0 1 1 0 8 0 amappl12 160 7 0 5 1 0 1 1 0 8 0 amappl11 152 56 0 41 1 0 1 1 0 8 0 amappl10 144 18 0 14 1 0 1 1 0 8 0 amappl9 136 435 0 431 1 0 1 1 0 8 0 amappl8 128 392 0 361 3 1 2 2 0 8 0 amappl7 120 119 0 107 1 0 1 1 0 8 0 amappl6 112 22 0 19 1 0 1 1 0 8 0 amappl5 104 254 0 238 1 0 1 1 0 8 0 amappl4 96 487 0 459 1 0 1 1 0 8 0 amappl3 88 108 0 99 1 0 1 1 0 8 0 amappl2 80 1965 0 1886 2 0 2 2 0 8 0 amappl1 72 17795 0 17330 23 13 10 18 0 8 0 amappl 80 919 0 872 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 13 0 0 1 0 1 1 0 8 0 uaddrrnd 24 358 0 339 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 358 0 339 1 0 1 1 0 8 0 vmmpekpl 168 6841 0 6807 2 0 2 2 0 8 0 vmmpepl 168 50443 0 48371 114 22 92 110 0 357 1 vmsppl 368 357 0 339 2 0 2 2 0 8 0 pdppl 4096 723 0 680 6 0 6 6 0 8 0 pvpl 32 159118 0 141153 157 5 152 152 0 265 7 pmappl 232 357 0 339 3 1 2 2 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 259 0 5 8 0 8 8 0 8 0 ddb{0}> machine ddbcpu 0 Invalid cpu 0 ddb{0}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff823c78eb) at panic+0x15c sys/kern/subr_prf.c:207 syn_cache_insert(fffffd8064992e78,ffff800000ad6cc0) at syn_cache_insert+0x9d4 sys/netinet/tcp_input.c:3235 syn_cache_add(ffff800020db8be0,ffff800020db8b90,fffffd80770b60c4,14,fffffd806b0634c8,fffffd80770b6000) at syn_cache_add+0x6e9 tcpstat_inc sys/netinet/tcp_var.h:645 [inline] syn_cache_add(ffff800020db8be0,ffff800020db8b90,fffffd80770b60c4,14,fffffd806b0634c8,fffffd80770b6000) at syn_cache_add+0x6e9 sys/netinet/tcp_input.c:3871 tcp_input(ffff800020db8ed8,ffff800020db8ee4,6,2) at tcp_input+0x3c67 sys/netinet/tcp_input.c:830 ip_deliver(ffff800020db8ed8,ffff800020db8ee4,6,2) at ip_deliver+0x353 sys/netinet/ip_input.c:668 ip_ours(ffff800020db8ed8,ffff800020db8ee4,ffff800020d984e0,0) at ip_ours+0x412 ip_input_if(ffff800020db8ed8,ffff800020db8ee4,4,0,ffff80000067a800) at ip_input_if+0x6ce ipv4_input(ffff80000067a800,fffffd80770b6000) at ipv4_input+0x48 sys/netinet/ip_input.c:215 if_input_local(ffff80000067a800,fffffd80770b6000,2) at if_input_local+0xf9 sys/net/if.c:775 loinput(ffff80000067a800,fffffd80770b6000,0) at loinput+0x4f sys/net/if_loop.c:239 if_input_process(ffff80000067a800,ffff800020db9048) at if_input_process+0x10b if_ih_input sys/net/if.c:908 [inline] if_input_process(ffff80000067a800,ffff800020db9048) at if_input_process+0x10b sys/net/if.c:942 ifiq_process(ffff80000067abf8) at ifiq_process+0x80 sys/net/ifq.c:646 taskq_thread(ffff80000002c000) at taskq_thread+0xec sys/kern/kern_task.c:437 end trace frame: 0x0, count: -14 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp x86_ipi_db(ffff800020d80ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:352 x86_ipi_handler() at x86_ipi_handler+0xc6 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 end of kernel end trace frame: 0x7f7ffffd01a0, count: 12 ddb{1}> trace x86_ipi_db(ffff800020d80ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:352 x86_ipi_handler() at x86_ipi_handler+0xc6 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 end of kernel end trace frame: 0x7f7ffffd01a0, count: -3