CVE-2021-47430
x86/entry: Clear X86_FEATURE_SMAP when CONFIG_X86_SMAP=n
Check your servers for CVE-2021-47430
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2021-47430 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
In the Linux kernel, the following vulnerability has been resolved:
x86/entry: Clear X86_FEATURE_SMAP when CONFIG_X86_SMAP=n
Commit
3c73b81a9164 ("x86/entry, selftests: Further improve user entry sanity checks")
added a warning if AC is set when in the kernel.
Commit
662a0221893a3d ("x86/entry: Fix AC assertion")
changed the warning to only fire if the CPU supports SMAP.
However, the warning can still trigger on a machine that supports SMAP but where it's disabled in the kernel config and when running the syscall_nt selftest, for example:
------------[ cut here ]------------ WARNING: CPU: 0 PID: 49 at irqentry_enter_from_user_mode CPU: 0 PID: 49 Comm: init Tainted: G T 5.15.0-rc4+ #98 e6202628ee053b4f310759978284bd8bb0ce6905 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014 RIP: 0010:irqentry_enter_from_user_mode ... Call Trace: ? irqentry_enter ? exc_general_protection ? asm_exc_general_protection ? asm_exc_general_protectio
IS_ENABLED(CONFIG_X86_SMAP) could be added to the warning condition, but even this would not be enough in case SMAP is disabled at boot time with the "nosmap" parameter.
To be consistent with "nosmap" behaviour, clear X86_FEATURE_SMAP when !CONFIG_X86_SMAP.
Found using entry-fuzz + satrandconfig.
[ bp: Massage commit message. ]
Exploitation
EPSS 0.22%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 12.8% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 21 May 2024):
- Exploitation
- none: CISA did not find evidence of exploitation or a public proof of concept
- Automatable
- no: each attack takes manual steps
- Technical impact
- partial: limited control or limited data
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from 3c73b81a9164d0c1b6379d6672d2772a9e95168e, before f2447f6587b8ffe42ba04d14ce67d429a1163e5e affected from 3c73b81a9164d0c1b6379d6672d2772a9e95168e, before 4e9ec1c65da98c293f75d83755dfa5e03075a6d0 affected from 3c73b81a9164d0c1b6379d6672d2772a9e95168e, before 3958b9c34c2729597e182cc606cc43942fd19f7c
Other versions: unaffected
|
| Linux |
affected 5.8 unaffected before 5.8 unaffected from 5.10.73 up to and including 5.10.* unaffected from 5.14.12 up to and including 5.14.* unaffected 5.15 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2021-47430 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2021-47430
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2021-47430
trivy image --scanners vuln IMAGE | grep CVE-2021-47430
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/f2447f6587b8ffe42ba04d14ce67d429a1163e5e git.kernel.org
- https://git.kernel.org/stable/c/4e9ec1c65da98c293f75d83755dfa5e03075a6d0 git.kernel.org
- https://git.kernel.org/stable/c/3958b9c34c2729597e182cc606cc43942fd19f7c git.kernel.org
Source: the record CVE-2021-47430 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse