CVE-2024-26951: wireguard: netlink: check for dangling peer via is_dead instead of empty list

Published May 1, 2024
·
Updated

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

wireguard: netlink: check for dangling peer via isdead instead of empty list

If all peers are removed via wgpeerremoveall(), rather than setting peerlist to empty, the peer is added to a temporary list with a head on the stack of wgpeerremoveall(). If a netlink dump is resumed and the cursored peer is one that has been removed via wgpeerremoveall(), it will iterate from that peer and then attempt to dump freed peers.

Fix this by instead checking peer->isdead, which was explictly created for this purpose. Also move up the deviceupdatelock lockdep assertion, since reading isdead relies on that.

It can be reproduced by a small script like:

echo "Setting config..." ip link add dev wg0 type wireguard wg setconf wg0 /big-config ( while true; do echo "Showing config..." wg showconf wg0 > /dev/null done ) & sleep 4 wg setconf wg0 <(printf "[Peer]\nPublicKey=$(wg genkey)\n")

Resulting in:

BUG: KASAN: slab-use-after-free in lockacquire+0x182a/0x1b20 Read of size 8 at addr ffff88811956ec70 by task wg/59 CPU: 2 PID: 59 Comm: wg Not tainted 6.8.0-rc2-debug+ #5 Call Trace: <TASK> dumpstacklvl+0x47/0x70 printaddressdescription.constprop.0+0x2c/0x380 printreport+0xab/0x250 kasanreport+0xba/0xf0 lockacquire+0x182a/0x1b20 lockacquire+0x191/0x4b0 downread+0x80/0x440 getpeer+0x140/0xcb0 wggetdevicedump+0x471/0x1130

Other sources

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

wireguard: netlink: check for dangling peer via isdead instead of empty list

The Linux kernel CVE team has assigned CVE-2024-26951 to this issue.

Upstream advisory: https://lore.kernel.org/linux-cve-announce/2024050127-CVE-2024-26951-5cbe@gregkh/T

Red Hat

Affected Software

19 affected componentsFixes available
debian/linux
5.10.223-15.10.234-16.1.129-16.1.133-16.12.22-1
Linux Linux kernel>=5.6<5.10.215
Linux Linux kernel>=5.11<5.15.154
Linux Linux kernel>=5.16<6.1.84
Linux Linux kernel>=6.2<6.6.24
Linux Linux kernel>=6.7<6.7.12
Linux Linux kernel>=6.8<6.8.3
Debian Debian Linux=10.0
redhat/kernel<5.10.215
5.10.215
redhat/kernel<5.15.154
5.15.154
redhat/kernel<6.1.84
6.1.84
redhat/kernel<6.6.24
6.6.24
redhat/kernel<6.7.12
6.7.12
redhat/kernel<6.8.3
6.8.3
redhat/kernel<6.9
6.9
Microsoft cbl2 hyperv-daemons 5.15.158.1-1
Microsoft cbl2 hyperv-daemons 5.15.153.1-1
Microsoft azl3 hyperv-daemons 6.6.35.1-1
Microsoft azl3 hyperv-daemons 6.6.22.1-2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 5.10.223-1Fixed in 5.10.234-1Fixed in 6.1.129-1Fixed in 6.1.133-1Fixed in 6.12.22-1
  2. Upgrade

    Upgrade redhat/kernel to a version that resolves this vulnerability.

    Fixed in 5.10.215
  3. Upgrade

    Upgrade redhat/kernel to a version that resolves this vulnerability.

    Fixed in 5.15.154
  4. Upgrade

    Upgrade redhat/kernel to a version that resolves this vulnerability.

    Fixed in 6.1.84
  5. Upgrade

    Upgrade redhat/kernel to a version that resolves this vulnerability.

    Fixed in 6.6.24
  6. Upgrade

    Upgrade redhat/kernel to a version that resolves this vulnerability.

    Fixed in 6.7.12
  7. Upgrade

    Upgrade redhat/kernel to a version that resolves this vulnerability.

    Fixed in 6.8.3
  8. Upgrade

    Upgrade redhat/kernel to a version that resolves this vulnerability.

    Fixed in 6.9
  9. Upgrade

    Upgrade Linux kernel (WireGuard: netlink) to a version that resolves this vulnerability.

    Patch CVE-2024-26951
  10. Upgrade

    Upgrade Linux kernel to a version that resolves this vulnerability.

    Patch wireguard: netlink: check for dangling peer via is_dead instead of empty list

Event History

May 1, 2024
CVE Published
via MITRE·05:18 AM
Data Sourced
via MITRE·05:18 AM
DescriptionSeverity
Data Sourced
via NVD·06:15 AM
Description
Data Sourced
via NVD·06:15 AM
RemedySeverityWeaknessAffected Software
Data Sourced
via Red Hat·04:48 PM
DescriptionSeverityAffected Software
May 13, 2024
Data Sourced
via Microsoft·07:00 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·07:00 AM
Affected Software
Updated
via Microsoft·07:00 AM
SeverityAffected Software
Updated
via Microsoft·07:00 AM
Affected Software
Updated
via Microsoft·07:00 AM
DescriptionSeverity
Jun 8, 2024
Data Sourced
via Launchpad·01:11 AM
Description
Apr 16, 2025
Data Sourced
via Ubuntu·02:19 PM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2024-26951?

CVE-2024-26951 is considered a moderate severity vulnerability in the Linux kernel.

2

How do I fix CVE-2024-26951?

To fix CVE-2024-26951, update to kernel version 5.10.215 or later, 5.15.154 or later, 6.1.84 or later, 6.6.24 or later, 6.7.12 or later, 6.8.3 or later, or 6.9.

3

Which Linux distributions are affected by CVE-2024-26951?

CVE-2024-26951 affects Red Hat and Debian distributions that utilize specific kernel versions.

4

What components of the Linux kernel are impacted by CVE-2024-26951?

CVE-2024-26951 impacts the WireGuard component within the Linux kernel related to netlink handling.

5

Is there any exploit available for CVE-2024-26951?

As of now, there are no public reports of active exploits for CVE-2024-26951.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203