{"id":"CVE-2024-26950","state":"PUBLISHED","title":"wireguard: netlink: access device through ctx instead of peer","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nwireguard: netlink: access device through ctx instead of peer\n\nThe previous commit fixed a bug that led to a NULL peer->device being\ndereferenced. It's actually easier and faster performance-wise to\ninstead get the device from ctx->wg. This semantically makes more sense\ntoo, since ctx->wg->peer_allowedips.seq is compared with\nctx->allowedips_seq, basing them both in ctx. This also acts as a\ndefence in depth provision against freed peers.","publishedAt":"2024-05-01T05:18:29.902Z","updatedAt":"2026-10-15T00:39:31.458Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"e7096c131e5161fa3b8e52a650d7719d2857adfd","status":"affected","lessThan":"493aa6bdcffd90a4f82aa614fe4f4db0641b4068","versionType":"git"},{"version":"e7096c131e5161fa3b8e52a650d7719d2857adfd","status":"affected","lessThan":"4be453271a882c8ebc28df3dbf9e4d95e6ac42f5","versionType":"git"},{"version":"e7096c131e5161fa3b8e52a650d7719d2857adfd","status":"affected","lessThan":"09c3fa70f65175861ca948cb2f0f791e666c90e5","versionType":"git"},{"version":"e7096c131e5161fa3b8e52a650d7719d2857adfd","status":"affected","lessThan":"c991567e6c638079304cc15dff28748e4a3c4a37","versionType":"git"},{"version":"e7096c131e5161fa3b8e52a650d7719d2857adfd","status":"affected","lessThan":"93bcc1752c69bb309f4d8cfaf960ef1faeb34996","versionType":"git"},{"version":"e7096c131e5161fa3b8e52a650d7719d2857adfd","status":"affected","lessThan":"d44bd323d8bb8031eef4bdc44547925998a11e47","versionType":"git"},{"version":"e7096c131e5161fa3b8e52a650d7719d2857adfd","status":"affected","lessThan":"71cbd32e3db82ea4a74e3ef9aeeaa6971969c86f","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/wireguard/netlink.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.6","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.6","versionType":"semver"},{"version":"5.10.215","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.154","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.84","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.24","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.7.12","status":"unaffected","lessThanOrEqual":"6.7.*","versionType":"semver"},{"version":"6.8.3","status":"unaffected","lessThanOrEqual":"6.8.*","versionType":"semver"},{"version":"6.9","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/wireguard/netlink.c"]}],"references":["https://git.kernel.org/stable/c/493aa6bdcffd90a4f82aa614fe4f4db0641b4068","https://git.kernel.org/stable/c/4be453271a882c8ebc28df3dbf9e4d95e6ac42f5","https://git.kernel.org/stable/c/09c3fa70f65175861ca948cb2f0f791e666c90e5","https://git.kernel.org/stable/c/c991567e6c638079304cc15dff28748e4a3c4a37","https://git.kernel.org/stable/c/93bcc1752c69bb309f4d8cfaf960ef1faeb34996","https://git.kernel.org/stable/c/d44bd323d8bb8031eef4bdc44547925998a11e47","https://git.kernel.org/stable/c/71cbd32e3db82ea4a74e3ef9aeeaa6971969c86f","https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html","https://cert-portal.siemens.com/productcert/html/ssa-265688.html"],"weaknesses":[],"ingestedAt":"2026-10-29T20:07:10.607Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/26xxx/CVE-2024-26950.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-26950","state":"PUBLISHED","datePublished":"2024-05-01T05:18:29.902Z","dateUpdated":"2026-10-15T00:39:31.458Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-02-19T14:20:24.198Z"},"containers":{"cna":{"title":"wireguard: netlink: access device through ctx instead of peer","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nwireguard: netlink: access device through ctx instead of peer\n\nThe previous commit fixed a bug that led to a NULL peer->device being\ndereferenced. It's actually easier and faster performance-wise to\ninstead get the device from ctx->wg. This semantically makes more sense\ntoo, since ctx->wg->peer_allowedips.seq is compared with\nctx->allowedips_seq, basing them both in ctx. This also acts as a\ndefence in depth provision against freed peers."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"e7096c131e5161fa3b8e52a650d7719d2857adfd","status":"affected","lessThan":"493aa6bdcffd90a4f82aa614fe4f4db0641b4068","versionType":"git"},{"version":"e7096c131e5161fa3b8e52a650d7719d2857adfd","status":"affected","lessThan":"4be453271a882c8ebc28df3dbf9e4d95e6ac42f5","versionType":"git"},{"version":"e7096c131e5161fa3b8e52a650d7719d2857adfd","status":"affected","lessThan":"09c3fa70f65175861ca948cb2f0f791e666c90e5","versionType":"git"},{"version":"e7096c131e5161fa3b8e52a650d7719d2857adfd","status":"affected","lessThan":"c991567e6c638079304cc15dff28748e4a3c4a37","versionType":"git"},{"version":"e7096c131e5161fa3b8e52a650d7719d2857adfd","status":"affected","lessThan":"93bcc1752c69bb309f4d8cfaf960ef1faeb34996","versionType":"git"},{"version":"e7096c131e5161fa3b8e52a650d7719d2857adfd","status":"affected","lessThan":"d44bd323d8bb8031eef4bdc44547925998a11e47","versionType":"git"},{"version":"e7096c131e5161fa3b8e52a650d7719d2857adfd","status":"affected","lessThan":"71cbd32e3db82ea4a74e3ef9aeeaa6971969c86f","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/wireguard/netlink.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.6","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.6","versionType":"semver"},{"version":"5.10.215","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.154","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.84","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.24","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.7.12","status":"unaffected","lessThanOrEqual":"6.7.*","versionType":"semver"},{"version":"6.8.3","status":"unaffected","lessThanOrEqual":"6.8.*","versionType":"semver"},{"version":"6.9","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/wireguard/netlink.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/493aa6bdcffd90a4f82aa614fe4f4db0641b4068"},{"url":"https://git.kernel.org/stable/c/4be453271a882c8ebc28df3dbf9e4d95e6ac42f5"},{"url":"https://git.kernel.org/stable/c/09c3fa70f65175861ca948cb2f0f791e666c90e5"},{"url":"https://git.kernel.org/stable/c/c991567e6c638079304cc15dff28748e4a3c4a37"},{"url":"https://git.kernel.org/stable/c/93bcc1752c69bb309f4d8cfaf960ef1faeb34996"},{"url":"https://git.kernel.org/stable/c/d44bd323d8bb8031eef4bdc44547925998a11e47"},{"url":"https://git.kernel.org/stable/c/71cbd32e3db82ea4a74e3ef9aeeaa6971969c86f"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerable code is reached only through the WireGuard generic-netlink family (`WG_CMD_GET_DEVICE` dump plus `WG_CMD_SET_DEVICE`), which requires a local netlink socket. Per kernel scoring guidance, netlink-driven configuration paths are Local.\nAC:L - The attacker controls both halves of the sequence — partially draining a multi-message dump, then replacing all peers to free the cursor peer, then resuming the same dump socket — so no uncontrolled timing window is involved and the upstream reproducer triggers it reliably.\nPR:L - The op is gated by `GENL_UNS_ADMIN_PERM`, i.e. `netlink_ns_capable(skb, net->user_ns, CAP_NET_ADMIN)`, which an unprivileged user obtains inside `unshare -Urn` where they can also create the wireguard interface. That is low privilege, not real root.\nUI:N - The entire sequence is performed by the attacker's own processes via netlink; no victim action, mount, or file open is required.\nS:U - The freed `wg_peer` and the corrupted/leaked data all live in the kernel's own security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - `get_peer()` on a dangling peer copies freed slab contents — including `handshake.remote_static`, `preshared_key`, and endpoint data — straight into the netlink reply delivered to userspace, and a reallocated peer makes `peer->device` an attacker-influenced pointer that is then dereferenced, yielding an arbitrary read primitive.\nI:H - The same path performs `down_read()`/`up_read()` on the freed object, executing atomic read-modify-write operations into reclaimed slab memory; a use-after-free of this shape is exploitable via heap grooming for controlled writes and control-flow influence.\nA:H - In the common case the freed peer is zeroed by `memzero_explicit()`, making `peer->device->peer_allowedips.seq` a NULL pointer dereference and an immediate kernel oops, with the sibling report showing a KASAN slab-use-after-free on the same path."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:28:30.984Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.6","versionEndExcluding":"5.10.215"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.6","versionEndExcluding":"5.15.154"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.6","versionEndExcluding":"6.1.84"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.6","versionEndExcluding":"6.6.24"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.6","versionEndExcluding":"6.7.12"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.6","versionEndExcluding":"6.8.3"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.6","versionEndExcluding":"6.9"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":5.5,"attackVector":"LOCAL","baseSeverity":"MEDIUM","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","integrityImpact":"NONE","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"LOW","confidentialityImpact":"NONE"}},{"other":{"type":"ssvc","content":{"timestamp":"2024-06-06T18:55:56.220490Z","id":"CVE-2024-26950","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"problemTypes":[{"descriptions":[{"type":"CWE","lang":"en","description":"CWE-noinfo Not enough information"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-11-07T15:00:58.528Z"}},{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/493aa6bdcffd90a4f82aa614fe4f4db0641b4068","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/4be453271a882c8ebc28df3dbf9e4d95e6ac42f5","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/09c3fa70f65175861ca948cb2f0f791e666c90e5","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/c991567e6c638079304cc15dff28748e4a3c4a37","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/93bcc1752c69bb309f4d8cfaf960ef1faeb34996","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/d44bd323d8bb8031eef4bdc44547925998a11e47","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/71cbd32e3db82ea4a74e3ef9aeeaa6971969c86f","tags":["x_transferred"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T00:21:05.839Z"}},{"affected":[{"vendor":"Siemens","product":"SIMATIC S7-1500 TM MFP - GNU/Linux subsystem","defaultStatus":"unknown","versions":[{"version":"0","status":"affected","lessThan":"V1.1.1","versionType":"custom"}]}],"references":[{"url":"https://cert-portal.siemens.com/productcert/html/ssa-265688.html"}],"providerMetadata":{"shortName":"siemens-SADP","orgId":"0b142b55-0307-4c5a-b3c9-f314f3fb7c5e","dateUpdated":"2026-10-15T00:39:31.458Z"},"x_adpType":"supplier"}]}}}