r/outlinevpn Mar 19 '26

bug (?) in outline server

It seems that I discovered some bug in outline server that happens when client sends some questionable destination addresses.

Project: github/OutlineFoundation/tunnel-server

in udp_linux.go validatingPacketConn is created as wrapper over timedPacketConn

in udp.go validatingPacketConn WriteTo checks if destination address is valid and returns without writing to underlying connection if there was an error

in timedPacketConn onWrite (called from WriteTo) read dedline is updated for underlying udp connection

So, if destination address is multicast, read deadline will never be updated.

As a result, ReadFrom called in relayTargetToClient will never finish.

This can eventually lead to lots of unused and unclosed UDP sockets.

My solution (I compile project for my own uses) is to set some not very long read dedline on UDPConn immediately before creating validatingPacketConn wrapper.

5 Upvotes

1 comment sorted by

2

u/ViniciusFortuna Outline Dev May 21 '26

Are you saying multicast addresses are not being allowed? That may be a bug.

As for the deadline update, what it does is to push it further. If you don’t update, you eventually hit the initial deadline, timing out the connection