CVE-2021-47368·Kernel vulnerability
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.
- Severity
- high
- Software
- Kernel
- Fixed in
- 5.14.9
- Published
- 2024-05-21
Affected versions
From: 5.11
Until: 5.14.9
Fixed in: 5.14.9
How to fix this CVE
Update your Linux kernel to version 5.14.9 or later to resolve a memory safety issue in the enetc network driver. The vulnerability stems from improper handling of CPU affinity hints, where temporary stack-allocated memory references are accessed after they go out of scope. Applying this kernel update eliminates the risk of kernel panics when reading IRQ affinity information from procfs.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check installed kernel version with `uname -r` and compare against affected range 5.11–5.14.8
- Step 2: Verify if enetc driver is loaded by running `lsmod | grep enetc`
- Step 3: Search kernel logs for oops or paging request errors: `dmesg | grep -i 'oops\|page fault\|affinity'`
- Step 4: After patching, confirm new kernel version with `uname -r` and verify it is 5.14.9 or later
FAQ
What is CVE-2021-47368?
CVE-2021-47368 is a kernel memory safety defect in the enetc ethernet driver where IRQ affinity hint references point to stack memory that becomes invalid after function execution, leading to potential kernel crashes when affinity information is accessed.
Is CVE-2021-47368 being actively exploited?
No, this vulnerability is not listed in CISA's Known Exploited Vulnerabilities catalog and has no public exploits available. However, it can be triggered by any local user reading the procfs affinity_hint file.
What versions of Kernel are affected by CVE-2021-47368?
Linux kernel versions 5.11 through 5.14.8 are affected; the issue is resolved in 5.14.9 and later.
How do I check if my server is vulnerable to CVE-2021-47368?
Run `uname -r` to display your kernel version and check if it falls within 5.11–5.14.8; also run `lsmod | grep enetc` to confirm the affected driver is present.
Does Defensia detect CVE-2021-47368?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Kernel is installed on a monitored server, CVE-2021-47368 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/4c4c3052911b577920353a7646e4883d5da40c28
- https://git.kernel.org/stable/c/6c3f1b741c6c2914ea120e3a5790d3e900152f7b
- https://git.kernel.org/stable/c/6f329d9da2a5ae032fcde800a99b118124ed5270
- https://git.kernel.org/stable/c/7237a494decfa17d0b9d0076e6cee3235719de90
- https://git.kernel.org/stable/c/4c4c3052911b577920353a7646e4883d5da40c28
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2021-47368. Free for 1 server.
Get started free