[Bug 284606] Kernel Panic on wireguard VPN router with a Mikrotik peer

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 06 Feb 2025 12:39:20 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=284606

            Bug ID: 284606
           Summary: Kernel Panic on wireguard VPN router with a Mikrotik
                    peer
           Product: Base System
           Version: 14.2-RELEASE
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: wencey@apernet.io

A router running multiple wireguard tunnels running
14.2-RELEASE-p1
with kernel
FreeBSD caesium 14.2-RELEASE-p1 FreeBSD 14.2-RELEASE-p1 GENERIC amd64
keep panic with dmesg written below.

We have observed that the rate of panic is much lower after a Mikrotik peer was
shutdown. 


Fatal trap 12: page fault while in kernel mode
cpuid = 6; apic id = 0c
fault virtual address   = 0x10
fault code              = supervisor read data, page not present
instruction pointer     = 0x20:0xffffffff80cfc37f
stack pointer           = 0x28:0xfffffe010c480c20
frame pointer           = 0x28:0xfffffe010c480cb0
code segment            = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 0
current process         = 0 (wg_tqg_6)
rdi: 0000000000000000 rsi: fffffe010c4808c8 rdx: ffffffff82a16090
rcx: 00000000ffffffff  r8: ffffffff82a16090  r9: 000000000000012c
rax: 0000000000000000 rbx: fffff800057f6d70 rbp: fffffe010c480cb0
r10: 0000000000000006 r11: fffffe001ebd6468 r12: fffff800057f6d00
r13: fffff8007dd72000 r14: fffff800057f6d00 r15: 0000000008080808
trap number             = 12
panic: page fault
cpuid = 6
time = 1738843725
KDB: stack backtrace:
#0 0xffffffff80b8b88d at kdb_backtrace+0x5d
#1 0xffffffff80b3dc11 at vpanic+0x131
#2 0xffffffff80b3dad3 at panic+0x43
#3 0xffffffff81025a0b at trap_fatal+0x40b
#4 0xffffffff81025a56 at trap_pfault+0x46
#5 0xffffffff80ffc388 at calltrap+0x8
#6 0xffffffff80cfeb4b at ip_input+0x32b
#7 0xffffffff80c8387e at netisr_dispatch_src+0x9e
#8 0xffffffff83169683 at wg_deliver_in+0x363
#9 0xffffffff80b8a24e at gtaskqueue_run_locked+0x14e
#10 0xffffffff80b89ed2 at gtaskqueue_thread_loop+0xc2
#11 0xffffffff80af760f at fork_exit+0x7f
#12 0xffffffff80ffd3ee at fork_trampoline+0xe
Uptime: 2m24s
Dumping 866 out of 16343 MB:..2%..12%..21%..32%..41%..52%..61%..71%..82%..91%
Dump complete

-- 
You are receiving this mail because:
You are the assignee for the bug.