Description
In Libreswan 3.27 an assertion failure can lead to a pluto IKE daemon restart. An attacker can trigger a NULL pointer dereference by initiating an IKEv2 IKE_SA_INIT exchange, followed by a bogus INFORMATIONAL exchange instead of the normallly expected IKE_AUTH exchange. This affects send_v2N_spi_response_from_state() in programs/pluto/ikev2_send.c that will then trigger a NULL pointer dereference leading to a restart of libreswan.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 13 | libreswan | 3.27-5 | — |
| Debian 12 | libreswan | 3.27-5 | — |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 8 | libreswan | 3.29-6.el8 | RHSA-2019:3391 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.24 | libreswan | 3.28-r0 | — |
| Alpine v3.23 | libreswan | 3.28-r0 | — |
| Alpine v3.22 | libreswan | 3.28-r0 | — |
| Alpine v3.21 | libreswan | 3.28-r0 | — |
| Alpine v3.20 | libreswan | 3.28-r0 | — |
Show 9 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.19 | libreswan | 3.28-r0 | — |
| Alpine v3.18 | libreswan | 3.28-r0 | — |
| Alpine v3.17 | libreswan | 3.28-r0 | — |
| Alpine v3.16 | libreswan | 3.28-r0 | — |
| Alpine v3.15 | libreswan | 3.28-r0 | — |
| Alpine v3.14 | libreswan | 3.28-r0 | — |
| Alpine v3.13 | libreswan | 3.28-r0 | — |
| Alpine v3.12 | libreswan | 3.28-r0 | — |
| Alpine v3.11 | libreswan | 3.28-r0 | — |
Advisories 1
- RHSA-2019:3391 Red Hat Security Advisory: libreswan security and bug fix update Red Hat Security Advisories (RHSA) · Jan 14, 2026
References
- http://www.iwantacve.cn/index.php/archives/218/
- https://github.com/libreswan/libreswan/issues/246
- https://github.com/libreswan/libreswan/compare/9b1394e...3897683
- https://libreswan.org/security/CVE-2019-12312/CVE-2019-12312.txt
- https://libreswan.org/security/CVE-2019-12312/libreswan-3.27-CVE-2019-12312.patch