-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kernel Panic Mode when sctp goes via a interface and IPSec #227
Comments
Feel free to send me a vmcore file from a debug kernel crash:
That being said SCTP being unreliable is clear FreeBSD territory. There are no relevant commits on stable/14 to my knowledge. Cheers, |
Hey Franco, Fatal trap 12: page fault while in kernel mode Best Regard |
Hey Richi, Yeah, the vmcore is last resort. Can you share via onedrive, just drop me a line at [email protected] -- highly appreciated! Cheers, |
Hello Franco, just to make it sure, did you receive my link through mail? Best regards, |
Hi Richi, Thanks for following up. Did not receive an email indeed. Can you try to resend? Thanks, |
Got it now, thanks! |
Ok I think this is involved in the NULL dereference happening here: If you set Firewall: Settings: Advanced: Bind states to interface -- do the crashes still occur? Cheers, |
Hi Franco, |
Hi Richi, Can you try this kernel? It is an immediate fix to the crash location but I'm not sure if the larger issue appears somewhere else afterwards:
Cheers, |
Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
Describe the bug
opnsense crashes, it seems to have something to do with sctp and a vpn. After some time we suspect that an object might be null or incorrectly filled -> https://github.com/opnsense/src/blob/stable/24.7/sys/netpfil/pf/pf.c#L7944
But it seems to occur only in combination with VPN and sctp, I had 2 test IPSec site to site and OpenVPN TAP, with both VPNs the problem occurred at the same place.
Only when the VPN is deactivated does the error not occur.
Didn't use this before 24.7.
To Reproduce
these sctp packets go through an IPSec tunnel, as soon as I activate the tunnel the OPNsense crashes. After a restart, the OPNsense runs for about 15 minutes until it crashes again. The VPN is site to site.
Expected behavior
No kernel panic mode in this case.
Relevant log files
--- trap 0xc, rip = 0xffffffff821ab744, rsp = 0xfffffe00625cef50, rbp = 0xfffffe00625cef50 ---
pfi_kkif_match() at pfi_kkif_match+0x24/frame 0xfffffe00625cef50
pf_test_rule() at pf_test_rule+0xe6b/frame 0xfffffe00625cf3a0
pf_sctp_multihome_delayed() at pf_sctp_multihome_delayed+0x30e/frame 0xfffffe00625cf4d0
pf_test() at pf_test+0xd1a/frame 0xfffffe00625cf680
pf_check_in() at pf_check_in+0x27/frame 0xfffffe00625cf6a0
pfil_mbuf_in() at pfil_mbuf_in+0x38/frame 0xfffffe00625cf6d0
enc_hhook() at enc_hhook+0x28a/frame 0xfffffe00625cf710
hhook_run_hooks() at hhook_run_hooks+0x61/frame 0xfffffe00625cf780
ipsec_run_hhooks() at ipsec_run_hhooks+0x6d/frame 0xfffffe00625cf7a0
ipsec4_common_input_cb() at ipsec4_common_input_cb+0x32a/frame 0xfffffe00625cf830
esp_input_cb() at esp_input_cb+0x430/frame 0xfffffe00625cf8e0
swcr_process() at swcr_process+0x25/frame 0xfffffe00625cf900
crypto_dispatch() at crypto_dispatch+0x60/frame 0xfffffe00625cf920
esp_input() at esp_input+0x4d8/frame 0xfffffe00625cf9f0
udp_ipsec_input() at udp_ipsec_input+0x17b/frame 0xfffffe00625cfa50
ipsec_kmod_udp_input() at ipsec_kmod_udp_input+0x2d/frame 0xfffffe00625cfa70
udp_append() at udp_append+0xe4/frame 0xfffffe00625cfae0
udp_input() at udp_input+0x803/frame 0xfffffe00625cfbc0
ip_input() at ip_input+0x268/frame 0xfffffe00625cfc20
netisr_dispatch_src() at netisr_dispatch_src+0x9e/frame 0xfffffe00625cfc70
ether_demux() at ether_demux+0x149/frame 0xfffffe00625cfca0
ether_nh_input() at ether_nh_input+0x36a/frame 0xfffffe00625cfd00
netisr_dispatch_src() at netisr_dispatch_src+0x9e/frame 0xfffffe00625cfd50
ether_input() at ether_input+0x56/frame 0xfffffe00625cfda0
re_rxeof() at re_rxeof+0x547/frame 0xfffffe00625cfe20
re_intr_msi() at re_intr_msi+0xf3/frame 0xfffffe00625cfe60
ithread_loop() at ithread_loop+0x257/frame 0xfffffe00625cfef0
fork_exit() at fork_exit+0x7f/frame 0xfffffe00625cff30
fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe00625cff30
--- trap 0, rip = 0, rsp = 0, rbp = 0 ---
KDB: enter: panic
panic.txt0600001214714623512 7136 ustarrootwheelpage faultversion.txt0600007414714623512 7541 ustarrootwheelFreeBSD 14.1-RELEASE-p6 stable/24.7-n267939-fd5bc7f34e1 SMP
Additional context
Uploaded through crash reporter
Environment
OPNsense 24.7.8-amd64
FreeBSD 14.1-RELEASE-p6
OpenSSL 3.0.15
AMD G-T40E Processor (2 cores, 2 threads)
The text was updated successfully, but these errors were encountered: