# CVE-2026-63918: l2tp: use refcount\_inc\_not\_zero in l2tp\_session\_get\_by\_ifname

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.16% (percentile 6, 2026-12-04)
- **CWE:** CWE-416
- **Published:** 2026-07-19T14:55:21.414Z
- **Modified:** 2026-10-30T14:29:17.460Z

## Who should check

- Anyone running Linux \>= abe7a1a7d0b69e63b1bca5f9531023a52336784f, \< ee80455feffb9cb62b5b58715cabeff495e666b2; \>= abe7a1a7d0b69e63b1bca5f9531023a52336784f, \< 947013fd7c8c35dd5856557b215840098a3f67f8; \>= abe7a1a7d0b69e63b1bca5f9531023a52336784f, \< 782d60a6596aee9b29c2eecfa70033899278bf65; \>= abe7a1a7d0b69e63b1bca5f9531023a52336784f, \< 05f95729ca844704d15e49ce14868af4b403b32b
- Anyone running Linux 6.12

## Description

In the Linux kernel, the following vulnerability has been resolved:

l2tp: use refcount\_inc\_not\_zero in l2tp\_session\_get\_by\_ifname

A reader in l2tp\_session\_get\_by\_ifname() can return a pointer to a
session whose refcount has reached zero. The getter takes its
reference with plain refcount\_inc(), but every other session getter
in the same file (l2tp\_v2\_session\_get, l2tp\_v3\_session\_get, and the
corresponding \_get\_next variants) uses refcount\_inc\_not\_zero()
because the IDR/RCU lookup can race with refcount\_dec\_and\_test() -\>
l2tp\_session\_free() -\> kfree\_rcu(). The ifname getter is the only
outlier; the inconsistency was raised on-list after 979c017803c4
("l2tp: use list\_del\_rcu in l2tp\_session\_unhash").

A reader inside rcu\_read\_lock\_bh() that matches session-\>ifname can
be preempted between the strcmp() and the refcount\_inc(). If the
last reference drops on another CPU in that window, the reader's
refcount\_inc() runs on a counter that has reached zero. refcount\_t
catches the addition-on-zero, prints "refcount\_t: addition on 0;
use-after-free", saturates the counter, and returns the saturated
pointer to the caller. Session memory is held live by the in-flight
RCU read section, but the kfree\_rcu() callback queued from
l2tp\_session\_free() will free it once the grace period closes; a
caller that dereferences the returned session past that point hits
a slab-use-after-free. On PREEMPT\_RT local\_bh\_disable() is a per-CPU
sleeping lock and the preemption window is real; on stock PREEMPT
kernels local\_bh\_disable() is a preempt\_count increment that closes
the cross-CPU race in practice (see below).

Use refcount\_inc\_not\_zero() and continue the list walk on failure,
matching the other session getters in the file. The ifname getter
is the only session getter in net/l2tp/ that still uses the bare
refcount\_inc() pattern; this change restores file-internal
consistency. The success path is unchanged.

## Affected and fixed versions

- Linux: \>= abe7a1a7d0b69e63b1bca5f9531023a52336784f, \< ee80455feffb9cb62b5b58715cabeff495e666b2; \>= abe7a1a7d0b69e63b1bca5f9531023a52336784f, \< 947013fd7c8c35dd5856557b215840098a3f67f8; \>= abe7a1a7d0b69e63b1bca5f9531023a52336784f, \< 782d60a6596aee9b29c2eecfa70033899278bf65; \>= abe7a1a7d0b69e63b1bca5f9531023a52336784f, \< 05f95729ca844704d15e49ce14868af4b403b32b (cvelist)
- Linux: 6.12 (cvelist)

## Mitigation

- Upgrade Linux to 05f95729ca844704d15e49ce14868af4b403b32b or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-63918. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-63918.md
Affected: Linux >= abe7a1a7d0b69e63b1bca5f9531023a52336784f, < ee80455feffb9cb62b5b58715cabeff495e666b2; >= abe7a1a7d0b69e63b1bca5f9531023a52336784f, < 947013fd7c8c35dd5856557b215840098a3f67f8; >= abe7a1a7d0b69e63b1bca5f9531023a52336784f, < 782d60a6596aee9b29c2eecfa70033899278bf65; >= abe7a1a7d0b69e63b1bca5f…
Fixed in: Linux 947013fd7c8c35dd5856557b215840098a3f67f8, Linux 782d60a6596aee9b29c2eecfa70033899278bf65, Linux 05f95729ca844704d15e49ce14868af4b403b32b

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-63918 being exploited?

There is no confirmed exploitation: CVE-2026-63918 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.16% chance of exploitation in the next 30 days (as of 2026-12-04).

### How serious is CVE-2026-63918?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2026-63918?

Linux \>= abe7a1a7d0b69e63b1bca5f9531023a52336784f, \< ee80455feffb9cb62b5b58715cabeff495e666b2; \>= abe7a1a7d0b69e63b1bca5f9531023a52336784f, \< 947013fd7c8c35dd5856557b215840098a3f67f8; \>= abe7a1a7d0b69e63b1bca5f9531023a52336784f, \< 782d60a6596aee9b29c2eecfa70033899278bf65; \>= abe7a1a7d0b69e63b1bca5f9531023a52336784f, \< 05f95729ca844704d15e49ce14868af4b403b32b; Linux 6.12.

### Is there a fix for CVE-2026-63918?

Yes. Fixed in Linux 947013fd7c8c35dd5856557b215840098a3f67f8, Linux 782d60a6596aee9b29c2eecfa70033899278bf65, Linux 05f95729ca844704d15e49ce14868af4b403b32b. Upgrade Linux to 05f95729ca844704d15e49ce14868af4b403b32b or later.

### How do I check if I'm affected by CVE-2026-63918?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/ee80455feffb9cb62b5b58715cabeff495e666b2>
- patch: <https://git.kernel.org/stable/c/947013fd7c8c35dd5856557b215840098a3f67f8>
- patch: <https://git.kernel.org/stable/c/782d60a6596aee9b29c2eecfa70033899278bf65>
- patch: <https://git.kernel.org/stable/c/05f95729ca844704d15e49ce14868af4b403b32b>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-63918>

HTML: <https://flawdb.com/CVE-2026-63918> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-63918>
