CVE-2026-129456

frr: bgpd use-after-free of Tunnel Encapsulation sub-TLVs after a malformed attribute length from a peer

Published Nov 14, 2026 CVSS 4.0 · 7.7 High EPSS n/a KEV · Not listed
Description
In FRRouting, bgpd accepts a Tunnel Encapsulation attribute (type 23) whose outer TLV length does not match the length of the attribute: the mismatch is only logged and the attribute is processed anyway. A BGP neighbor can send UPDATE messages carrying such an attribute that put the reference count of the attribute's interned sub-TLV chain out of balance, so that the chain is freed while routes stored by bgpd (Adj-RIB-In entries and RIB paths) still point to it. When those routes are later replaced, withdrawn or cleared, for example when the session goes down, bgpd reads the freed memory, decrements a reference count inside it and frees it a second time. In the reporter's build without AddressSanitizer this ended in an assertion failure in bgpd's memory accounting, aborting bgpd and dropping all BGP sessions on the router, and the neighbor can repeat it each time bgpd restarts. Because freed heap memory is written to and freed again, consequences beyond a crash cannot be ruled out. An established BGP session is required. bgpd processes attribute 23 from every neighbor, including eBGP neighbors, unless it is explicitly discarded, although RFC 9012 requires it to be filtered on eBGP sessions by default. The issue was reproduced with "soft-reconfiguration inbound" configured for the neighbor, and the reporter observed that the crash does not occur on every attempt.

Analysis

AI-generated

Technical impact

In FRRouting’s bgpd, a Tunnel Encapsulation attribute (type 23) can be sent with a malformed outer TLV length that does not match the actual attribute size. The router logs the mismatch but still processes the attribute, decrementing the reference count of the attribute’s internal sub‑TLV chain. When routes that reference that chain are withdrawn or replaced, bgpd accesses freed memory, spurious ref‑count decrements occur, and a second free is attempted. In practice this causes an assertion failure and process abort, dropping all BGP sessions on the router and allowing the malicious peer to repeat the attack on each restart. Thus the vulnerability leads to a denial of service and, because memory is freed and reused, other unintended effects cannot be ruled out.

Affected Systems

The protocol daemon bgpd in the FRRouting project, both under its original bundled distribution and under any distribution that includes FRRouting (frrouting:frrouting). All versions of FRRouting that do not contain the patch committing proper TLV length validation are affected; affected versions are those listed before the remedial commit referenced in the advisory.

Risk and Exploitability

The CVSS score of 7.7 places this flaw in the high severity class. Exploitation requires that an attacker already owns or can wire an active BGP session to the router, therefore the attack vector is remote but limited to legitimate BGP peers. The EPSS score is not available, and the vulnerability is not listed in the CISA KEV catalog, but once a peer can send a malformed attribute it can repeatedly crash bgpd after it is restarted. The worst outcome is permanent loss of BGP peering until the router is patched or the rogue attribute is filtered; if the attacker can control multiple peers or compromise the router’s BGP session they may cause widespread routing outages. The misuse of the global memory allocator in this CVE raises the possibility of memory corruption that could compromise the router’s overall process integrity beyond a simple crash.

Remediation

Vendor Workaround

Configure "neighbor <neighbor> path-attribute discard 23" (or "neighbor <neighbor> path-attribute treat-as-withdraw 23") for neighbors that are not expected to send the Tunnel Encapsulation attribute, in particular all eBGP neighbors. bgpd then skips the attribute without parsing it.


OpenCVE Recommended Actions

  • Upgrade FRRouting to a version that includes the TLV length validation fix
  • Configure ‘neighbor <neighbor> path‑attribute discard 23’ (or ‘neighbor <neighbor> path‑attribute treat‑as‑withdraw 23’) for any eBGP neighbors that should not transmit the Tunnel Encapsulation attribute so that bgpd skips parsing the attribute
  • Monitor BGP session stability and kernel logs for recurring crashes and inspect incoming UPDATE messages for malformed Tunnel Encapsulation attributes

Generated by OpenCVE AI on November 14, 2026 at 20:18 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Description In FRRouting, bgpd accepts a Tunnel Encapsulation attribute (type 23) whose outer TLV length does not match the length of the attribute: the mismatch is only logged and the attribute is processed anyway. A BGP neighbor can send UPDATE messages carrying such an attribute that put the reference count of the attribute's interned sub-TLV chain out of balance, so that the chain is freed while routes stored by bgpd (Adj-RIB-In entries and RIB paths) still point to it. When those routes are later replaced, withdrawn or cleared, for example when the session goes down, bgpd reads the freed memory, decrements a reference count inside it and frees it a second time. In the reporter's build without AddressSanitizer this ended in an assertion failure in bgpd's memory accounting, aborting bgpd and dropping all BGP sessions on the router, and the neighbor can repeat it each time bgpd restarts. Because freed heap memory is written to and freed again, consequences beyond a crash cannot be ruled out. An established BGP session is required. bgpd processes attribute 23 from every neighbor, including eBGP neighbors, unless it is explicitly discarded, although RFC 9012 requires it to be filtered on eBGP sessions by default. The issue was reproduced with "soft-reconfiguration inbound" configured for the neighbor, and the reporter observed that the crash does not occur on every attempt.
Title frr: bgpd use-after-free of Tunnel Encapsulation sub-TLVs after a malformed attribute length from a peer
First Time appeared Frrouting
Frrouting frrouting
Weaknesses CWE-415
CWE-416
CPEs cpe:2.3:a:frrouting:frrouting:*:*:*:*:*:*:*:*
Vendors & Products Frrouting
Frrouting frrouting
References
Metrics cvssV4_0

{'score': 7.7, 'vector': 'CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:L/AU:N/R:A'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
NetDEF
Published
Updated
Nov 14, 2026, 7:13 PM
Reserved
Nov 14, 2026, 7:03 PM
Status
Received
Published
Nov 14, 2026, 8:17 PM
Modified
Nov 14, 2026, 8:17 PM