Skip to content
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

Add support for Path MTU Discovery (PMTUD) #105

Open
stv0g opened this issue Oct 10, 2022 · 3 comments
Open

Add support for Path MTU Discovery (PMTUD) #105

stv0g opened this issue Oct 10, 2022 · 3 comments

Comments

@stv0g
Copy link
Collaborator

stv0g commented Oct 10, 2022

cunicu currently attempts at auto-detecting a correct tunnel MTU by taking the link/route MTUs into consideration.
However, this will not be optimal as the path MTU can be smaller than the link MTUs.
Such cases can be detected via PMTUD.

However, there is another twist to this.
In larger WireGuard meshes we somehow need to coordinate all peers to use the smallest of all peer-to-peer path MTUs.
This can be achieved via our signaling backend by including a detected path MTU into the peer descriptions.

@stv0g
Copy link
Collaborator Author

stv0g commented Oct 15, 2022

@stv0g
Copy link
Collaborator Author

stv0g commented Oct 18, 2022

@stv0g
Copy link
Collaborator Author

stv0g commented Oct 18, 2022

There is a quite helpful discussion on the WireGuard mailing list which I have linked above.
Similar discussions have been held by the IPsec community which deals with similar issues.

The conclusion of these discussions is, that tunnel protocols should not relay on ICMP packet-to-big (PTB) messages from outside the tunnel as these are not authenticated and can be forged. This would allow attackers to purposefully reduce the tunnel MTU to perform a DoS attack or infer information about the encrypted payloads.

Performing classing PMTUD through the tunnel is not working. Instead PLMTUD seems the way to go here.

I plan to implement PLMTUD in cunicu according to the current IETF draft on Packetization Layer Path MTU Discovery for Datagram Transports.

@stv0g stv0g added this to the First Stable (v1.0) milestone Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant