CVE-2021-46971
perf/core: Fix unconditional security_locked_down() call
Check your servers for CVE-2021-46971
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-46971 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:
perf/core: Fix unconditional security_locked_down() call
Currently, the lockdown state is queried unconditionally, even though its result is used only if the PERF_SAMPLE_REGS_INTR bit is set in attr.sample_type. While that doesn't matter in case of the Lockdown LSM, it causes trouble with the SELinux's lockdown hook implementation.
SELinux implements the locked_down hook with a check whether the current task's type has the corresponding "lockdown" class permission ("integrity" or "confidentiality") allowed in the policy. This means that calling the hook when the access control decision would be ignored generates a bogus permission check and audit record.
Fix this by checking sample_type first and only calling the hook when its result would be honored.
Exploitation
EPSS 0.23%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 14.8% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 28 Feb 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 b0c8fdc7fdb77586c3d1937050925b960743306e, before b246759284d6a2bc5b6f1009caeeb3abce2ec9ff affected from b0c8fdc7fdb77586c3d1937050925b960743306e, before 4348d3b5027bc3ff6336368b6c60605d4ef8e1ce affected from b0c8fdc7fdb77586c3d1937050925b960743306e, before f5809ca4c311b71bfaba6d13f4e39eab0557895e affected from b0c8fdc7fdb77586c3d1937050925b960743306e, before c7b0208ee370b89d20486fae71cd9abb759819c1 affected from b0c8fdc7fdb77586c3d1937050925b960743306e, before 08ef1af4de5fe7de9c6d69f1e22e51b66e385d9b
Other versions: unaffected
|
| Linux |
affected 5.4 unaffected before 5.4 unaffected from 5.4.117 up to and including 5.4.* unaffected from 5.10.35 up to and including 5.10.* unaffected from 5.11.19 up to and including 5.11.* unaffected from 5.12.2 up to and including 5.12.* unaffected 5.13 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-46971 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2021-46971
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-46971
trivy image --scanners vuln IMAGE | grep CVE-2021-46971
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/b246759284d6a2bc5b6f1009caeeb3abce2ec9ff git.kernel.org
- https://git.kernel.org/stable/c/4348d3b5027bc3ff6336368b6c60605d4ef8e1ce git.kernel.org
- https://git.kernel.org/stable/c/f5809ca4c311b71bfaba6d13f4e39eab0557895e git.kernel.org
- https://git.kernel.org/stable/c/c7b0208ee370b89d20486fae71cd9abb759819c1 git.kernel.org
- https://git.kernel.org/stable/c/08ef1af4de5fe7de9c6d69f1e22e51b66e385d9b git.kernel.org
Source: the record CVE-2021-46971 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