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

Summary

CVECVE-2026-129456
StatePUBLISHED
AssignerNetDEF
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-11-14 20:17:40 UTC
Updated2026-11-14 20:17:40 UTC
DescriptionIn 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.

Risk And Classification

Primary CVSS: v4.0 7.7 HIGH from 57a55968-44ac-464c-a794-6ba3baad09c4

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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:N/R:A/V:X/RE:X/U:X

Problem Types: CWE-415 | CWE-416 | CWE-416 CWE-416 Use After Free: the interned Tunnel Encapsulation sub-TLV chain is freed while stored routes still reference it, and encap_unintern() later reads and decrements its reference count | CWE-415 CWE-415 Double Free


VersionSourceTypeScoreSeverityVector
4.057a55968-44ac-464c-a794-6ba3baad09c4Secondary7.7HIGHCVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:L/E:X/C...
4.0CNACVSS7.7HIGHCVSS: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

CVSS v4.0 Breakdown

Attack Vector
Network
Attack Complexity
High
Attack Requirements
Present
Privileges Required
Low
User Interaction
None
Confidentiality
High
Integrity
High
Availability
High
Sub Conf.
None
Sub Integrity
None
Sub Availability
Low

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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:N/R:A/V:X/RE:X/U:X

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Frrouting Frrouting affected f4c89855b594d4b32bb3610537703215c978440e * git Not specified
CNA Frrouting Frrouting affected 10.4.0 10.4.4 semver Not specified
CNA Frrouting Frrouting affected 10.5.0 10.5.4 semver Not specified

References

ReferenceSourceLinkTags
github.com/FRRouting/frr/commit/bebf95f02bc0dccc6a1841f0c8cbcba1f617d655 57a55968-44ac-464c-a794-6ba3baad09c4 github.com
github.com/FRRouting/frr/commit/abef07b500e19baa924d157ab03809b93730e619 57a55968-44ac-464c-a794-6ba3baad09c4 github.com
github.com/FRRouting/frr/pull/21176/changes/1238ac4a06e5c23595e8bf626856... 57a55968-44ac-464c-a794-6ba3baad09c4 github.com
github.com/FRRouting/frr/issues/20874 57a55968-44ac-464c-a794-6ba3baad09c4 github.com
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Vendor Comments And Credit

Discovery Credit

CNA: Fault Chain (https://faultchain.com/) (en)

CNA: Donatas Abraitis <[email protected]> (en)

Additional Advisory Data

Workarounds

CNA: 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.

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report