CVE-2024-50102 x86: fix user address masking non-canonical speculation issue

Medium 5.5 Published Updated

A speculative execution flaw in the Linux kernel allows local attackers to leak sensitive data via non-canonical address accesses on AMD Zen 5 processors.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2024-50102?

CVE-2024-50102 is a medium-severity vulnerability in Linux kernel, published on 5 Nov 2024. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

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

x86: fix user address masking non-canonical speculation issue

It turns out that AMD has a "Meltdown Lite(tm)" issue with non-canonical accesses in kernel space. And so using just the high bit to decide whether an access is in user space or kernel space ends up with the good old "leak speculative data" if you have the right gadget using the result:

CVE-2020-12965 “Transient Execution of Non-Canonical Accesses“

Now, the kernel surrounds the access with a STAC/CLAC pair, and those instructions end up serializing execution on older Zen architectures, which closes the speculation window.

But that was true only up until Zen 5, which renames the AC bit [1]. That improves performance of STAC/CLAC a lot, but also means that the speculation window is now open.

Note that this affects not just the new address masking, but also the regular valid_user_address() check used by access_ok(), and the asm version of the sign bit check in the get_user() helpers.

It does not affect put_user() or clear_user() variants, since there's no speculative result to be used in a gadget for those operations.

Weakness: CWE-203

Which versions are affected by CVE-2024-50102?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-50102?

Apply the vendor's patch.

Is CVE-2024-50102 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as AZL-52590, BELL-CVE-2024-50102, DEBIAN-CVE-2024-50102, GHSA-mhcq-hvgj-xm2h, ROOT-OS-UBUNTU-2404-CVE-2024-50102, UBUNTU-CVE-2024-50102.

Is CVE-2024-50102 in your software?

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

Check your SBOMs for free