{
  "threat_severity" : "Low",
  "public_date" : "2024-05-01T00:00:00Z",
  "bugzilla" : {
    "description" : "kernel: wireguard: netlink: check for dangling peer via is_dead instead of empty list",
    "id" : "2278197",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2278197"
  },
  "cvss3" : {
    "cvss3_base_score" : "5.5",
    "cvss3_scoring_vector" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
    "status" : "verified"
  },
  "details" : [ "In the Linux kernel, the following vulnerability has been resolved:\nwireguard: netlink: check for dangling peer via is_dead instead of empty list\nIf all peers are removed via wg_peer_remove_all(), rather than setting\npeer_list to empty, the peer is added to a temporary list with a head on\nthe stack of wg_peer_remove_all(). If a netlink dump is resumed and the\ncursored peer is one that has been removed via wg_peer_remove_all(), it\nwill iterate from that peer and then attempt to dump freed peers.\nFix this by instead checking peer->is_dead, which was explictly created\nfor this purpose. Also move up the device_update_lock lockdep assertion,\nsince reading is_dead relies on that.\nIt can be reproduced by a small script like:\necho \"Setting config...\"\nip link add dev wg0 type wireguard\nwg setconf wg0 /big-config\n(\nwhile true; do\necho \"Showing config...\"\nwg showconf wg0 > /dev/null\ndone\n) &\nsleep 4\nwg setconf wg0 <(printf \"[Peer]\\nPublicKey=$(wg genkey)\\n\")\nResulting in:\nBUG: KASAN: slab-use-after-free in __lock_acquire+0x182a/0x1b20\nRead of size 8 at addr ffff88811956ec70 by task wg/59\nCPU: 2 PID: 59 Comm: wg Not tainted 6.8.0-rc2-debug+ #5\nCall Trace:\n<TASK>\ndump_stack_lvl+0x47/0x70\nprint_address_description.constprop.0+0x2c/0x380\nprint_report+0xab/0x250\nkasan_report+0xba/0xf0\n__lock_acquire+0x182a/0x1b20\nlock_acquire+0x191/0x4b0\ndown_read+0x80/0x440\nget_peer+0x140/0xcb0\nwg_get_device_dump+0x471/0x1130" ],
  "affected_release" : [ {
    "product_name" : "Red Hat Enterprise Linux 9",
    "release_date" : "2024-11-12T00:00:00Z",
    "advisory" : "RHSA-2024:9315",
    "cpe" : "cpe:/a:redhat:enterprise_linux:9",
    "package" : "kernel-0:5.14.0-503.11.1.el9_5"
  }, {
    "product_name" : "Red Hat Enterprise Linux 9",
    "release_date" : "2024-11-12T00:00:00Z",
    "advisory" : "RHSA-2024:9315",
    "cpe" : "cpe:/o:redhat:enterprise_linux:9",
    "package" : "kernel-0:5.14.0-503.11.1.el9_5"
  } ],
  "package_state" : [ {
    "product_name" : "Red Hat Enterprise Linux 6",
    "fix_state" : "Not affected",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:6"
  }, {
    "product_name" : "Red Hat Enterprise Linux 7",
    "fix_state" : "Not affected",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:7"
  }, {
    "product_name" : "Red Hat Enterprise Linux 7",
    "fix_state" : "Not affected",
    "package_name" : "kernel-rt",
    "cpe" : "cpe:/o:redhat:enterprise_linux:7"
  }, {
    "product_name" : "Red Hat Enterprise Linux 8",
    "fix_state" : "Not affected",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:8"
  }, {
    "product_name" : "Red Hat Enterprise Linux 8",
    "fix_state" : "Not affected",
    "package_name" : "kernel-rt",
    "cpe" : "cpe:/o:redhat:enterprise_linux:8"
  }, {
    "product_name" : "Red Hat Enterprise Linux 9",
    "fix_state" : "Affected",
    "package_name" : "kernel-rt",
    "cpe" : "cpe:/o:redhat:enterprise_linux:9"
  } ],
  "references" : [ "https://www.cve.org/CVERecord?id=CVE-2024-26951\nhttps://nvd.nist.gov/vuln/detail/CVE-2024-26951\nhttps://lore.kernel.org/linux-cve-announce/2024050127-CVE-2024-26951-5cbe@gregkh/T" ],
  "name" : "CVE-2024-26951",
  "csaw" : false
}