CVE-2024-28835: Gnutls: potential crash during chain building/verification
A flaw has been discovered in GnuTLS where an application crash can be induced when attempting to verify a specially crafted .pem bundle using the "certtool --verify-chain" command.
Other sources
Embargoed issue as reported at https://gitlab.com/gnutls/gnutls/-/issues/1525 (duplicate - https://gitlab.com/gnutls/gnutls/-/issues/1527)
---
Description of problem: I'm reporting a crash observed during chain building/verification. I've turned into a reproducer (not minimal yet, but reliably crashes for me), which I'm attaching to this issue.
As additional context: this reproducer comes from Netflix's BetterTLS (github.com/Netflix/bettertls) project; specifically, it's test case 61 in their "path validation" suite. As such, it's already public on the Internet. However, nobody appears to have run BetterTLS against a recent version of GnuTLS, so I'm filing this as a private issue for triage.
Version of gnutls used: This crash has been observed on GnuTLS 3.8.3, via certtool. I'm using the Homebrew distribution of GnuTLS 3.8.3: https://formulae.brew.sh/formula/gnutls#default
How reproducible: I'm attaching a reproducer in the form of a PEM bundle
Steps to Reproduce: certtool --verify-chain --infile bug.pem
Expected results: I expected a normal program exit, with an exit code of 1 or 0.
Actual results: The program crashes with SIGTRAP, which is probably just because macOS catches the SIGSEGV for triage.
Observed output: Note that no verification profile was selected. In the future the medium profile will be enabled by default.Use --verify-profile low to apply the default verification of NORMAL priority string.|<1>| There was a non-CA certificate in the trusted list: O=bettertls.com,CN=D,serialNumber=9d9b1ac3-6af5-47f2-9cdb-2201652648a0.Trace/BPT trap: 5
— Red Hat
GnuTLS is vulnerable to a denial of service, caused by a flaw during chain building/verification. By using a specially crafted .pem bundle using the "certtool --verify-chain" command, a remote attacker could exploit this vulnerability to cause the application to crash.
— IBM
Gnutls: potential crash during chain building/verification
— Microsoft
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
ubuntu/gnutls28to a version that resolves this vulnerability.Fixed in 3.7.3-4ubuntu1.5 - Upgrade
Upgrade
ubuntu/gnutls28to a version that resolves this vulnerability.Fixed in 3.8.1-4ubuntu1.3 - Upgrade
Upgrade
ubuntu/gnutls28to a version that resolves this vulnerability.Fixed in 3.8.3-1.1ubuntu3.1 - Upgrade
Upgrade
debian/gnutls28to a version that resolves this vulnerability.Fixed in 3.6.7-4+deb10u8Fixed in 3.6.7-4+deb10u12Fixed in 3.8.5-4 - Upgrade
Upgrade
redhat/gnutlsto a version that resolves this vulnerability.Fixed in 3.8.4 - Upgrade
Upgrade
gnutlsto a version that resolves this vulnerability.Fixed in 3.8.4 - Configuration
When using certtool --verify-chain, ensure you apply the default verification with NORMAL priority string (as in: "apply the default verification of NORMAL priority string"), instead of omitting/using an unspecified verification profile that could trigger the crash.
certtool (GnuTLS) verification profile / priority string = NORMAL - Compensating control
Avoid using certtool --verify-chain on untrusted or externally supplied specially crafted PEM bundles, since a remote attacker could induce an application crash via a crafted .pem bundle.
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is the severity of CVE-2024-28835?
CVE-2024-28835 has been identified as a high-severity vulnerability that can lead to application crashes.
How do I fix CVE-2024-28835?
To fix CVE-2024-28835, you should upgrade to a patched version of GnuTLS such as 3.7.3-4ubuntu1.5 for Ubuntu or equivalent versions for other distributions.
Which software is affected by CVE-2024-28835?
CVE-2024-28835 affects GnuTLS versions prior to the specified patched releases, as well as IBM QRadar and F5 Traffix SDC in certain versions.
What commands trigger the vulnerability in CVE-2024-28835?
The vulnerability in CVE-2024-28835 can be triggered by using the 'certtool --verify-chain' command with a specially crafted .pem bundle.
Is there a workaround for CVE-2024-28835?
Currently, the best course of action for CVE-2024-28835 is to apply the provided software updates, as no specific workaround has been identified.