frr: bgpd use-after-free of Tunnel Encapsulation sub-TLVs after a malformed attribute length from a peer
Summary
| CVE | CVE-2026-129456 |
|---|---|
| State | PUBLISHED |
| Assigner | NetDEF |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-11-14 20:17:40 UTC |
| Updated | 2026-11-14 20:17:40 UTC |
| 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. |
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
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 4.0 | 57a55968-44ac-464c-a794-6ba3baad09c4 | Secondary | 7.7 | HIGH | 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/C... |
| 4.0 | CNA | CVSS | 7.7 | HIGH | 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 |
CVSS v4.0 Breakdown
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
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| 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.