CVE-2026-63918

Source
https://cve.org/CVERecord?id=CVE-2026-63918
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-63918.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2026-63918
Downstream
Published
2026-07-19T14:55:21.414Z
Modified
2026-07-22T03:31:55.972521548Z
Severity
  • 7.8 (High) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
l2tp: use refcount_inc_not_zero in l2tp_session_get_by_ifname
Details

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

l2tp: use refcountincnotzero in l2tpsessiongetby_ifname

A reader in l2tpsessiongetbyifname() can return a pointer to a session whose refcount has reached zero. The getter takes its reference with plain refcountinc(), but every other session getter in the same file (l2tpv2sessionget, l2tpv3sessionget, and the corresponding getnext variants) uses refcountincnotzero() because the IDR/RCU lookup can race with refcountdecandtest() -> l2tpsessionfree() -> kfreercu(). The ifname getter is the only outlier; the inconsistency was raised on-list after 979c017803c4 ("l2tp: use listdelrcu in l2tpsessionunhash").

A reader inside rcureadlockbh() that matches session->ifname can be preempted between the strcmp() and the refcountinc(). If the last reference drops on another CPU in that window, the reader's refcountinc() runs on a counter that has reached zero. refcountt catches the addition-on-zero, prints "refcountt: 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 kfreercu() callback queued from l2tpsessionfree() 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 PREEMPTRT localbhdisable() is a per-CPU sleeping lock and the preemption window is real; on stock PREEMPT kernels localbhdisable() is a preemptcount increment that closes the cross-CPU race in practice (see below).

Use refcountincnotzero() 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 refcountinc() pattern; this change restores file-internal consistency. The success path is unchanged.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/63xxx/CVE-2026-63918.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
abe7a1a7d0b69e63b1bca5f9531023a52336784f
Fixed
ee80455feffb9cb62b5b58715cabeff495e666b2
Fixed
947013fd7c8c35dd5856557b215840098a3f67f8
Fixed
782d60a6596aee9b29c2eecfa70033899278bf65
Fixed
05f95729ca844704d15e49ce14868af4b403b32b

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-63918.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.12.0
Fixed
6.12.93
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.18.35
Type
ECOSYSTEM
Events
Introduced
6.19.0
Fixed
7.0.12

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-63918.json"