CVE-2026-127231: GnuTLS frees its X.509 name-constraints lists twice when a reinitialisation fails under memory pressure

ByLinuxtastic

December 1, 2026 #CVE, #GnuTLS

Name constraints are the X.509 extension that lets a CA certificate say which names the certificates below it may carry, and a verifier has to collect and apply them as it walks a chain. GnuTLS 3.8.13 keeps them in an object that is reinitialised when a new set arrives, and the record says that “when an already populated name constraints object is reinitialized, previously freed list pointers are not cleared, so a memory allocation failure precisely at reinitialization leaves a dangling pointer that is freed again during a later cleanup”. A remote attacker reaches it “via a certificate chain containing a NameConstraints extension processed while the application is under memory pressure”, and the outcome is an application crash. GnuTLS rates it Low, since the allocation has to fail at that one point, and scores it 5.9. Update to GnuTLS 3.8.14 when your distribution ships it; builds before 3.8.13 do not carry the flaw.

CVE-2026-127231 at a glance.

ComponentGnuTLS, the X.509 name-constraints handling in lib/x509/name_constraints.c (_gnutls_x509_name_constraints_clear(), name_constraints_deinit(), name_constraints_node_list_deinit()), reached from chain verification in lib/x509/verify.c
Affected versionsGnuTLS 3.8.13 only (3.8.13 and before 3.8.14), per the GnuTLS CNA record; the project’s advisory id is GNUTLS-SA-2026-11-18-3. Debian’s tracker nonetheless marks its 3.7.9 and 3.8.9 packages vulnerable, and SUSE marks every product not affected; both are recorded below
Fixed inGnuTLS 3.8.14, the record’s own solution (“backport upstream commit ‘x509: make name constraints deinitialization idempotent’, or update to GnuTLS 3.8.14”; commit 95256a91bbf1e5f15f75bbd0454c7b05f7b4858a per Debian’s tracker); Debian sid 3.8.14-2 carries it. The copies of gnutls.org’s security and news pages read for this page still show 3.8.13 of 29 April 2026 as the newest release, so the release date is not stated here
SeverityGnuTLS (CNA) CVSS 3.1 5.9 Medium (AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H), with the project’s own rating Low (“exploitation requires an allocation failure to happen at a specific call”), CWE-415 (double free); NVD Received with the CNA score. SUSE moderate but not affected; Ubuntu Medium; Debian “Minor issue”, no DSA for trixie; Red Hat’s page unreachable on 1 December
Exploited in the wildNot on CISA’s Known Exploited Vulnerabilities list as of 1 December 2026 (catalogue 2026.11.30). EPSS 0.00376 (34th percentile) on 1 December 2026
Who is exposedProcesses on Linux built against GnuTLS 3.8.13 that verify certificate chains from remote peers under memory pressure: every client that checks the server’s chain, and every server that verifies client certificates. The chain must carry a NameConstraints extension, which is uncommon in public CA chains and ordinary in private PKIs. 3.8.13 was released on 29 April 2026, so the exposed hosts are the ones tracking a current branch: Debian forky and sid before the fix, Fedora, Arch, Tumbleweed and self-built; the enterprise distributions ship older builds. The impact is a crash of the process
PublishedReported to GnuTLS 15 June 2026, reproduced 17 August, advisory 18 November 2026, CVE record 19 November 2026; this page built 1 December 2026, last updated 1 December 2026

What it is

A double free is what happens when a structure is torn down twice. The name-constraints object in GnuTLS holds lists of permitted and excluded names, and its deinitialisation frees those lists; the work item, filed by Xuqing Yang, follows the error path in lib/x509/verify.c where a populated object is reinitialised for the next certificate in the chain. The deinitialisation freed the list nodes but left the pointers to them in the object. If the allocation that follows, the one that builds the new lists, fails, the function returns an error with the object still holding the stale pointers, and the cleanup at the end of verification frees them a second time. The record’s solution line names the fix: make the deinitialisation idempotent, by clearing the pointers it frees.

The attacker’s part is to present a chain with a NameConstraints extension and to have the verifier running short of memory at that moment. The first is easy for anyone who can be a TLS peer, since the chain the attacker sends does not have to validate, only to be parsed as far as name constraints; the second is the “heap pressure” that makes this a Low for the project and AC:H in the vector. A long chain of constrained intermediates, sent many times to a process under a memory limit, is the shape of an attempt. The impact is availability only; nothing is read or written beyond the crash.

The affected range is narrow. The record names 3.8.13 “on all platforms” and nothing earlier, and SUSE, whose newest builds are 3.8.9 and older, marks every product not affected and its page resolved; Debian’s tracker marks bookworm and trixie vulnerable at 3.7.9 and 3.8.9, which disagrees with the record and is reported here as the tracker states it. The fix is in 3.8.14 alongside CVE-2026-127039 and CVE-2026-127040, two allocation-failure crashes reported by Joshua Rogers, each with its own page. The gnutls.org advisory and news pages as served to this run still ended at 3.8.13, so the advisory text here is taken from the CVE record, the work item and the distribution trackers.

Who is affected on Linux

Each row is what the distribution’s own security tracker said on 1 December 2026; the link in the row is the tracker page, which will be newer than this one. GnuTLS is the TLS library behind GNOME, wget, Emacs, QEMU, cups, Exim and much else on these systems, so the package row covers a great deal of software.

DistributionStatusFixed package
AlpineTracker unreachable on 1 December 2026 (client error); nothing inferred—
Debiangnutls28 marked vulnerable in bookworm (3.7.9-2+deb12u7) and trixie (3.8.9-3+deb13u4, “no-dsa, Minor issue”), although both are below the record’s 3.8.13; vulnerable in forky (3.8.13-1); fixed in sid; Debian bug 1154435sid 3.8.14-2
UbuntuPriority Medium; gnutls28 “Needs evaluation” on 16.04 through 26.10; no USNnothing on 1 December 2026
RHEL, Rocky, Alma, CentOS StreamTracker unreachable on 1 December 2026 (client error on the page and on the hydra JSON); nothing inferred—
openSUSE/SLERated moderate, state Resolved; every listed product Not affected (SUSE’s builds predate 3.8.13); SUSE bug 1290890— (not affected)
Arch, Fedora, Gentoo, self-built GnuTLSNot consulted for this page; the upstream 3.8.14 release applies3.8.14

How to check

Two questions settle most hosts, and a third the rest: is the library exactly 3.8.13, which processes map it, and do any of them verify chains from peers you do not control while under a memory limit.

# 1. the library version (only 3.8.13 is in range; 3.8.14 is fixed; anything older is not affected)
dpkg -s libgnutls30t64 2>/dev/null | grep '^Version'; dpkg -s libgnutls30 2>/dev/null | grep '^Version'; rpm -q gnutls 2>/dev/null; pacman -Q gnutls 2>/dev/null
gnutls-cli --version 2>/dev/null | head -1

# 2. running processes that map libgnutls
for p in $(pgrep -f '.'); do grep -l 'libgnutls\.so' /proc/$p/maps 2>/dev/null | sed "s|.*|pid $p: $(tr '\0' ' ' < /proc/$p/cmdline | cut -c1-60)|"; done 2>/dev/null | sort -u

# 3. does a chain you already trust carry name constraints? (a private CA's chain often does; it is not the attack, just the feature)
for f in /etc/ssl/certs/*.pem; do openssl x509 -in "$f" -noout -text 2>/dev/null | grep -q 'Name Constraints' && echo "$f"; done | head
# memory limits on the processes from step 2
for u in $(systemctl list-units --type=service --state=running --no-legend | awk '{print $1}'); do m=$(systemctl show -p MemoryMax --value "$u"); [ "$m" != infinity ] && echo "$u MemoryMax=$m"; done

A host whose GnuTLS is anything other than 3.8.13 is done: older builds do not carry the code the record describes, whatever the Debian rows say, and 3.8.14 has the fix. A 3.8.13 host, which on 1 December means forky, Fedora, Arch, Tumbleweed or a self-built library, should look at step 2 for processes that face arbitrary peers and at the memory limits, since those are the ones a hostile chain can crash.

How to fix it

Install the GnuTLS update when your distribution publishes one, then restart every process that maps the library or reboot; a running process keeps the old libgnutls until it exits. needrestart on Debian and Ubuntu, or dnf needs-restarting on the RHEL family, lists what still holds the old copy.

# Debian sid / testing-tracking hosts (stable has no fix on 1 December 2026)
apt update && apt install --only-upgrade libgnutls30t64 && needrestart -r a
# Fedora / RHEL family / SUSE: no package carries a fix on 1 December 2026; check again with
dnf updateinfo info --cve CVE-2026-127231 2>/dev/null
zypper list-patches --cve=CVE-2026-127231 2>/dev/null
# self-built: GnuTLS 3.8.14, or cherry-pick 95256a91bbf1e5f15f75bbd0454c7b05f7b4858a onto 3.8.13

The record’s own solution is the upgrade or the backport of the idempotent-deinitialisation commit, and there is no configuration that stops a verifier parsing name constraints. What reduces the odds is the same as for the siblings: headroom under the memory limit, a restart policy on the unit, and a cap on concurrent handshakes at the proxy. What not to do: do not pin a rolling-release host to 3.8.12 to escape the range, since 3.8.13 closed thirteen advisories of its own; and do not strip NameConstraints from a private CA because this page mentions them, since the extension is the defence, not the bug.

Sources

  • CVE-2026-127231 at CVE.org — the GnuTLS CNA record (19 November 2026): the description, 3.8.13 before 3.8.14, CVSS 3.1 5.9, the project’s Low rating, CWE-415, the solution line naming the commit and 3.8.14, the timeline and the credit to Xuqing Yang
  • GnuTLS work item 1906 — “Double-Free in _gnutls_verify_crt_status via Error-Path during Name Constraints Initialization”: the lines in verify.c and name_constraints.c, the proposed fix
  • GnuTLS security advisories and news — the vendor advisory pages named in the record; the copies read on 1 December ended at 3.8.13 and carried no entry for GNUTLS-SA-2026-11-18-3
  • NVD entry — Received; published 19 November; the CNA’s score, CWE and the program files and routines named; no CPEs
  • Distribution trackers: Debian (sid 3.8.14-2 fixed; commit 95256a91; bug 1154435) · Ubuntu (Medium, needs evaluation; GNUTLS-SA-2026-11-18-3) · SUSE (not affected, resolved) · Red Hat (unreachable on 1 December)
  • CISA KEV catalogue 2026.11.30, not listed · EPSS 0.00376 on 1 December 2026

Related reading

This advisory page was assembled from the primary sources listed above on 1 December 2026 and is updated when they change. The facts are theirs; the checks and the ordering are ours. If a row in the distribution table is out of date, the tracker link in that row is the current word.