REDHAT-BUG-2550258: Null Pointer Dereference
The Libreswan Project was informed of a Null Pointer Dereference bug in the PKCS#7 handling code for authentication that can result in a denial of service against the libreswan pluto daemon.
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.
An malicious IKEAUTH packet can trigger this bug, meaning the peer need not be authenticated. Continued attempts to use IKEv2 with such malicious payloads can cause a denial of service. No remote code execution is possible.
Vulnerable versions : 4.7 - 5.4 Not vulnerable : 5.3.3, 5.4.1
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
libreswanto a version that resolves this vulnerability.Fixed in 5.4.1