The Libreswan Project libreswan
IKEv2 Use-After-Free bug when using IKE-over-TCP
Libreswan's pluto daemon has a use-after-free vulnerability when a client connecting using IKE over TCP closes the connection and another packet (retransmit or malicious) is received for the same tuple. IKE state is retained in memory after the client closes the connection, storing a pointer to iface_endpoint inside ike_sa.sa->st_iface_endpoint. Once this invalid pointer is used, the daemon crashes and restarts. This vulnerability can be triggered before the remote peer has authenticated itself. Continued exploitation can lead to a denial of service. Remote code execution could be possible. The IKE over TCP option is not enabled by default; only configurations that contain listen-tcp=yes are affected.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 4.0, <= 5.3.2
- >= 5.4, <= 5.4
Fixed in 5.3.3, 5.4.1
Mitigation
Upgrade to libreswan 5.3.3 or 5.4.1 or later. Patches are available at https://libreswan.org/security/CVE-2026-94453/
Workaround
To temporarily disable IKE over TCP, set listen-tcp=no.
References
- Vendor advisory libreswan.org/security/CVE-2026-94453/CVE-2026-94…
- Patch libreswan.org/security/CVE-2026-94453
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.