FreeBSD VuXML: Documenting security issues in FreeBSD and the FreeBSD Ports Collection

FreeBSD -- SO_REUSEPORT_LB breaks connect(2) for UDP sockets

Affected packages
14.3 <= FreeBSD-kernel < 14.3_5
13.5 <= FreeBSD-kernel < 13.5_6

Details

VuXML ID 114cc98b-afad-11f0-af12-bc241121aa0a
Discovery 2025-10-22
Entry 2025-10-23

Problem Description:

Connected sockets are not intended to belong to load-balancing groups. However, the kernel failed to check the connection state of sockets when adding them to load-balancing groups. Furthermore, when looking up the destination socket for an incoming packet, the kernel will match a socket belonging to a load-balancing group even if it is connected.

Connected sockets are only supposed to receive packets originating from the connected host. The above behavior violates this contract.

Impact:

Software which sets SO_REUSEPORT_LB on a socket and then connects it to a host will not observe any problems. However, due to its membership in a load-balancing group, that socket will receive packets originating from any host. This breaks the contract of the connect(2) and implied connect via sendto(2), and may leave the application vulnerable to spoofing attacks.

References

CVE Name CVE-2025-24934
FreeBSD Advisory SA-25:09.netinet