CVE-2026-77207: Null Pointer Dereference in PKCS#7 bundle with no certificates
Libreswan has a null pointer dereference bug in the PKCS#7 handling code for IKE certificate authentication. When libreswan decodes an IKE CERT payload of type CERTPKCS7WRAPPEDX509, it guards the PKCS#7 blob with SECPKCS7ContainsCertsOrCrls() and then iterates the certificate list with SECPKCS7GetCertificateList(). The two NSS APIs disagree on a SignedData that carries a CRL but no certificates: ContainsCertsOrCrls() returns PRTRUE (there is a CRL), so the guard passes, but GetCertificateList() returns NULL (there are no certificates). This causes libreswan to dereference a null pointer leading to a crash and restart. A malicious IKEAUTH packet can trigger this bug, meaning the peer does not need to be authenticated. No remote code execution is possible. Continued exploitation can cause a denial of service.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
libreswanto a version that resolves this vulnerability.Fixed in 5.3.3 - Upgrade
Upgrade
libreswanto a version that resolves this vulnerability.Fixed in 5.4.1
Event History
Frequently Asked Questions
Who can exploit this issue?
Any remote peer able to send a malicious IKE_AUTH packet to a Libreswan service can trigger it. The peer does not need to be authenticated.
What packet content is required to trigger the crash?
The IKE CERT payload must use CERT_PKCS7_WRAPPED_X509 and contain PKCS#7 SignedData with a CRL but no certificates. This makes the initial NSS check succeed while the certificate-list API returns NULL.
What is the impact of successful exploitation?
Successful exploitation crashes and restarts Libreswan, enabling denial of service through repeated requests. The provided information states that remote code execution is not possible.