CVE-2024-42247 wireguard: allowedips: avoid unaligned 64-bit memory accesses

High 7.5 Published Updated

Unaligned memory access in WireGuard allowedips on parisc platforms causes kernel warnings, potentially leading to denial of service.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2024-42247?

CVE-2024-42247 is a high-severity denial of service vulnerability in Linux kernel, published on 7 Aug 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

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

wireguard: allowedips: avoid unaligned 64-bit memory accesses

On the parisc platform, the kernel issues kernel warnings because swap_endian() tries to load a 128-bit IPv6 address from an unaligned memory location:

Kernel: unaligned access to 0x55f4688c in wg_allowedips_insert_v6+0x2c/0x80 [wireguard] (iir 0xf3010df) Kernel: unaligned access to 0x55f46884 in wg_allowedips_insert_v6+0x38/0x80 [wireguard] (iir 0xf2010dc)

Avoid such unaligned memory accesses by instead using the get_unaligned_be64() helper macro.

[Jason: replace src[8] in original patch with src+8]

Weakness: CWE-770

Which versions are affected by CVE-2024-42247?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-42247?

Apply the vendor's patch.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2024-42247 being exploited?

There is no known exploitation of CVE-2024-42247 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as AZL-47504, AZL-47628, BELL-CVE-2024-42247, DEBIAN-CVE-2024-42247, GHSA-m475-c2qh-xg8v, UBUNTU-CVE-2024-42247.

Is CVE-2024-42247 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free