gnutls: Double-free in GnuTLS ASN.1 export logic (Subject Alternative Name otherName) (CVE-2025-32988) #shorts
Summary
In this episode we discuss CVE-2025-32988, a critical double-free vulnerability in GnuTLS that can be triggered remotely via malformed Subject Alternative Name entries. An attacker can exploit this flaw through public GnuTLS APIs to cause denial of service or memory corruption in affected applications.
Product details
GnuTLS is a widely used open-source library for implementing TLS, SSL, and DTLS protocols. It’s bundled in many Linux distributions and container platforms, including SUSE and Red Hat Enterprise Linux up to version 9, as well as OpenShift Container Platform 4.
Vulnerability type summary
This is a double-free vulnerability arising from incorrect ownership handling in the export logic of ASN.1 Subject Alternative Name otherName entries. When an invalid or malformed type-id OID is processed, GnuTLS frees the same ASN.1 structure twice.
Details of the vulnerability
Within GnuTLS’s SAN export code, malformed otherName entries trigger asn1_delete_structure() on a node the library doesn’t own. The parent function then frees it again, leading to memory corruption or crash. Since only public APIs are required, an attacker can craft a malicious certificate or handshake payload over the network to trigger the issue.
Conclusion
Administrators and developers should update GnuTLS to version 3.8.10 or later immediately. SUSE and other vendors have released security patches addressing CVE-2025-32988 along with other fixes. Apply updates, review your TLS-using services, and monitor for unexpected crashes to mitigate risk.
Watch the full video on YouTube: CVE-2025-32988
Remediation and exploitation details
This chain involves the following actors
- Attacker: Crafts and delivers malformed data to trigger the vulnerability
- System Administrator: Maintains affected systems and applies updates
- Software Vendor: Provides patches for the GnuTLS library
This following systems are involved
- GnuTLS library (Provides cryptographic functions and secure communication protocols): Processes certificates and handles Subject Alternative Name extensions
- Client or Server Application (Uses GnuTLS for establishing secure connections): Imports and exports certificates through the GnuTLS library
Attack entry point
- Certificate Parsing Routine: Function in GnuTLS that processes Subject Alternative Name entries using public APIs
Remediation actions
Exploitation actions
Certificate creation with invalid object identifier in SAN entry
- Call gnutls_x509_crt_set_subject_alt_name with type GNUTLS_SAN_OTHERNAME and supply an invalid OID string
Certificate import via public API
- Invoke gnutls_x509_crt_import on the crafted certificate data
Export SAN entries with malformed type identifier
- Execute gnutls_x509_crt_get_subject_alt_name and then serialize the extension data
Double free of ASN.1 node
- Observe asn1_delete_structure being called on the same node twice, leading to memory corruption
Denial of service or arbitrary memory corruption via double free
- Application crashes or behaves unpredictably when handling the malformed SAN entry
Related Content
NOTE: The following related content has not been vetted and may be unsafe.
- https://access.redhat.com/security/cve/CVE-2025-32988
- https://bugzilla.redhat.com/show_bug.cgi?id=2359622
- [2025-07-10] A critical vulnerability in GnuTLS's asn1_delete_structure function has been identified as CVE-2025-32988, potentially exploitable via network attacks.
- [2025-07-17] SUSE releases important security patches for GNUTLS to address multiple vulnerabilities.
- [2025-08-01] SUSE releases important fix for buffer overflows in gnutls, addressing CVE-2025-32988 and other issues.