CVE-2021-47368 enetc: Fix illegal access when reading affinity_hint

High 7.1 Published Updated

A use-after-free bug in the enetc driver causes a kernel crash when reading affinity hints, leading to denial of service.

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-47368?

CVE-2021-47368 is a high-severity vulnerability in Linux kernel, published on 21 May 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:

enetc: Fix illegal access when reading affinity_hint

irq_set_affinity_hit() stores a reference to the cpumask_t parameter in the irq descriptor, and that reference can be accessed later from irq_affinity_hint_proc_show(). Since the cpu_mask parameter passed to irq_set_affinity_hit() has only temporary storage (it's on the stack memory), later accesses to it are illegal. Thus reads from the corresponding procfs affinity_hint file can result in paging request oops.

The issue is fixed by the get_cpu_mask() helper, which provides a permanent storage for the cpumask_t parameter.

Weakness: CWE-400

Which versions are affected by CVE-2021-47368?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2021-47368?

Apply the vendor's patch.

Is CVE-2021-47368 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as DEBIAN-CVE-2021-47368, GHSA-7hrf-mgqx-vhg4, UBUNTU-CVE-2021-47368.

Is CVE-2021-47368 in your software?

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

Check your SBOMs for free