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
Server crash on client reconnect with fragmentation enabled #400
Comments
I think this might be a similar issue: #417 In my case the client is not trying to reconnect, but someone else on the internet sends an early negotiation malformed packet and crashes the whole server. |
I'm not touching the crux of this issue, just pointing out that this seems to be related to the use of the The That said, this issue deserves a fix. But also consider to stop using |
I cannot do so: my provider breaks PMTUD by doing some kind of tunneling while not using jumbo frames: https://forum.fibra.click/d/44630-lista-nera-dei-provider-che-multiplexano-le-sessioni-ppp-via-tunnel-l2tp |
I believe setting |
I have a hard time reproducing this. Just using the config and connecting/reconnecting a client does not trigger any crash for me |
This is a layer 2 tunnel and this won't work for other hosts except the openvpn client itself: my tap interface is bridged with a whole vlan interface. |
I managed to bisect this crash to 0d96997.
|
Thanks I already have a patch for that will hopefully will be commited in the next few days. It is currently under review. |
Any updates on this? Can you please post the patch (I failed to find it in your fork of openvpn or any mailing list), so I can check if the issue is fixed? |
Hi. The patches are in the 2.6.7 release that hit github yesterday. Due to some internal coordination and availability issues it was not coordinated as well as it could have been. The commits are commit 57a5cd1
and commit 1cfca65
the second one fixes the div-by-zero, the other one was found trying to figure out what happens trying to reply to a corrupt inbound TLS packet. |
The crash seems to be fixed, thanks. |
Describe the bug
When a client reconnects, the server exits on signal 8.
This is caused by a division by zero in
optimal_fragment_size
.frame_calculate_fragment
is never called, soframe->max_fragment_size
is zero.To Reproduce
Set
fragment
andmssfix
. Connect with a client, disconnect, connect again right away.Relevant server configuration:
Expected behavior
The instance should be properly initialized and
frame_calculate_fragment
should be called. The server should not crash.Version information (please complete the following information):
Server:
Client:
Additional context
On the first connection I get:
On the second connection, this doesnt happen. Instead, I get this first line:
Crash backtrace:
This configuration worked on openvpn-2.4.9_3, FreeBSD 12.2-RELEASE-p14.
The text was updated successfully, but these errors were encountered: