CVE-2021-46993 sched: Fix out-of-bound access in uclamp

High 7.8 Published Updated

An out-of-bounds memory access in the Linux kernel scheduler allows attackers to potentially execute code or cause a system crash.

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-2021-46993?

CVE-2021-46993 is a high-severity memory corruption vulnerability in Linux kernel, published on 28 Feb 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:

sched: Fix out-of-bound access in uclamp

Util-clamp places tasks in different buckets based on their clamp values for performance reasons. However, the size of buckets is currently computed using a rounding division, which can lead to an off-by-one error in some configurations.

For instance, with 20 buckets, the bucket size will be 1024/20=51. A task with a clamp of 1024 will be mapped to bucket id 1024/51=20. Sadly, correct indexes are in range [0,19], hence leading to an out of bound memory access.

Clamp the bucket id to fix the issue.

Weakness: CWE-125

Which versions are affected by CVE-2021-46993?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2021-46993?

Apply the vendor's patch.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2021-46993 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as DEBIAN-CVE-2021-46993, GHSA-gwvc-g8fg-56vx, UBUNTU-CVE-2021-46993.

Is CVE-2021-46993 in your software?

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

Check your SBOMs for free