{
  "id": "CVE-2026-63918",
  "url": "https://poc.griffinguard.io/cve/CVE-2026-63918",
  "published_at": "2026-07-19T14:55:21.414Z",
  "title": "l2tp: use refcount_inc_not_zero in l2tp_session_get_by_ifname",
  "vendor": "Linux",
  "product": "Linux",
  "cvss": {
    "score": 7.8,
    "source": "cna",
    "vector": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "In the Linux kernel, the following vulnerability has been resolved:\n\nl2tp: use refcount_inc_not_zero in l2tp_session_get_by_ifname\n\nA reader in l2tp_session_get_by_ifname() can return a pointer to a\nsession whose refcount has reached zero. The getter takes its\nreference with plain refcount_inc(), but every other session getter\nin the same file (l2tp_v2_session_get, l2tp_v3_session_get, and the\ncorresponding _get_next variants) uses refcount_inc_not_zero()\nbecause the IDR/RCU lookup can race with refcount_dec_and_test() -\u003e\nl2tp_session_free() -\u003e kfree_rcu(). The ifname getter is the only\noutlier; the inconsistency was raised on-list after 979c017803c4\n(\"l2tp: use list_del_rcu in l2tp_session_unhash\").\n\nA reader inside rcu_read_lock_bh() that matches session-\u003eifname can\nbe preempted between the strcmp() and the refcount_inc(). If the\nlast reference drops on another CPU in that window, the reader's\nrefcount_inc() runs on a counter that has reached zero. refcount_t\ncatches the addition-on-zero, prints \"refcount_t: addition on 0;\nuse-after-free\", saturates the counter, and returns the saturated\npointer to the caller. Session memory is held live by the in-flight\nRCU read section, but the kfree_rcu() callback queued from\nl2tp_session_free() will free it once the grace period closes; a\ncaller that dereferences the returned session past that point hits\na slab-use-after-free. On PREEMPT_RT local_bh_disable() is a per-CPU\nsleeping lock and the preemption window is real; on stock PREEMPT\nkernels local_bh_disable() is a preempt_count increment that closes\nthe cross-CPU race in practice (see below).\n\nUse refcount_inc_not_zero() and continue the list walk on failure,\nmatching the other session getters in the file. The ifname getter\nis the only session getter in net/l2tp/ that still uses the bare\nrefcount_inc() pattern; this change restores file-internal\nconsistency. The success path is unchanged.",
  "cwe": "CWE-416",
  "cpes": [
    "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:7.1:rc1:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:7.1:rc2:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:7.1:rc3:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:7.1:rc4:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:7.1:rc5:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 7.8
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= abe7a1a7d0b69e63b1bca5f9531023a52336784f, \u003c ee80455feffb9cb62b5b58715cabeff495e666b2",
          "\u003e= abe7a1a7d0b69e63b1bca5f9531023a52336784f, \u003c 947013fd7c8c35dd5856557b215840098a3f67f8",
          "\u003e= abe7a1a7d0b69e63b1bca5f9531023a52336784f, \u003c 782d60a6596aee9b29c2eecfa70033899278bf65",
          "\u003e= abe7a1a7d0b69e63b1bca5f9531023a52336784f, \u003c 05f95729ca844704d15e49ce14868af4b403b32b"
        ],
        "fixed_in": [
          "ee80455feffb9cb62b5b58715cabeff495e666b2",
          "947013fd7c8c35dd5856557b215840098a3f67f8",
          "782d60a6596aee9b29c2eecfa70033899278bf65",
          "05f95729ca844704d15e49ce14868af4b403b32b"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "6.12"
        ],
        "fixed_in": [
          "0",
          "6.12.93",
          "6.18.35",
          "7.0.12",
          "7.1"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to ee80455feffb9cb62b5b58715cabeff495e666b2 or 947013fd7c8c35dd5856557b215840098a3f67f8 or 782d60a6596aee9b29c2eecfa70033899278bf65 or 05f95729ca844704d15e49ce14868af4b403b32b or later.",
      "Upgrade Linux to 0 or 6.12.93 or 6.18.35 or 7.0.12 or 7.1 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
