LiveActive security incident?Get immediate response
CVE Record

CVE-2021-47128: bpf, lockdown, audit: Fix buggy SELinux lockdown permission checks

In the Linux kernel, the following vulnerability has been resolved: bpf, lockdown, audit: Fix buggy SELinux lockdown permission checks Commit 59438b46471a ("security,lockdown,selinux: implement SELinux lockdown") added an implementation of the locked_down LSM hook to SELinux, with the aim to restrict which domains are allowed to perform operations that would breach lockdown. This is indirectly also getting audit subsystem involved to report events. The latter is problematic, as reported by Ondrej and Serhei, since it can bring down the whole system via audit: 1) The audit events that are triggered due to calls to security_locked_down() can OOM kill a machine, see below details [0]. 2) It also seems to be causing a deadlock via avc_has_perm()/slow_avc_audit() when trying to wake up kauditd, for example, when using trace_sched_switch() tracepoint, see details in [1]. Triggering this was not via some hypothetical corner case, but with existing tools like runqlat & runqslower from bcc, for example, which make use of this tracepoint. Rough call sequence goes like: rq_lock(rq) -> -------------------------+ trace_sched_switch() -> | bpf_prog_xyz() -> +-> deadlock selinux_lockdown() -> | audit_log_end() -> | wake_up_interruptible() -> | try_to_wake_up() -> | rq_lock(rq) --------------+ What's worse is that the intention of 59438b46471a to further restrict lockdown settings for specific applications in respect to the global lockdown policy is completely broken for BPF. The SELinux policy rule for the current lockdown check looks something like this: allow <who> <who> : lockdown { <reason> }; However, this doesn't match with the 'current' task where the security_locked_down() is executed, example: httpd does a syscall. There is a tracing program attached to the syscall which triggers a BPF program to run, which ends up doing a bpf_probe_read_kernel{,_str}() helper call. The selinux_lockdown() hook does the permission check against 'current', that is, httpd in this example. httpd has literally zero relation to this tracing program, and it would be nonsensical having to write an SELinux policy rule against httpd to let the tracing helper pass. The policy in this case needs to be against the entity that is installing the BPF program. For example, if bpftrace would generate a histogram of syscall counts by user space application: bpftrace -e 'tracepoint:raw_syscalls:sys_enter { @[comm] = count(); }' bpftrace would then go and generate a BPF program from this internally. One way of doing it [for the sake of the example] could be to call bpf_get_current_task() helper and then access current->comm via one of bpf_probe_read_kernel{,_str}() helpers. So the program itself has nothing to do with httpd or any other random app doing a syscall here. The BPF program _explicitly initiated_ the lockdown check. The allow/deny policy belongs in the context of bpftrace: meaning, you want to grant bpftrace access to use these helpers, but other tracers on the system like my_random_tracer _not_. Therefore fix all three issues at the same time by taking a completely different approach for the security_locked_down() hook, that is, move the check into the program verification phase where we actually retrieve the BPF func proto. This also reliably gets the task (current) that is trying to install the BPF tracing program, e.g. bpftrace/bcc/perf/systemtap/etc, and it also fixes the OOM since we're moving this out of the BPF helper's fast-path which can be called several millions of times per second. The check is then also in line with other security_locked_down() hooks in the system where the enforcement is performed at open/load time, for example, open_kcore() for /proc/kcore access or module_sig_check() for module signatures just to pick f ---truncated---

UnknownCVSS not scoredNot KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

This Linux kernel flaw can let normal observability activity destabilize a locked-down SELinux system. BPF tracing checks were performed in the wrong place, causing excessive audit activity, possible memory exhaustion, deadlock, and incorrect policy decisions. The source does not show active exploitation.

Executive priority

Prioritize for production Linux systems that rely on SELinux lockdown or intensive BPF observability. The business risk is service instability and incorrect enforcement, not confirmed remote compromise. Patch through normal kernel maintenance, faster for critical monitoring or multi-tenant hosts.

Technical view

SELinux implemented the lockdown LSM hook for BPF helpers by checking the current task during helper execution. The source says this could flood audit, OOM kill systems, deadlock around scheduler tracepoints, and apply policy to unrelated processes instead of the BPF program installer. The fix moves enforcement to BPF verification/load time.

Likely exposure

Exposure is most likely on Linux systems using SELinux lockdown with BPF tracing or observability tools such as bcc, bpftrace, perf, or systemtap. Exact downstream distribution exposure requires checking vendor kernel backports, because the bundle lists upstream Linux versions and stable commits only.

Exploitation context

The source describes real triggering with existing tracing tools, not a hypothetical corner case. It does not cite malicious exploitation, public exploit use, or CISA KEV listing. Treat this primarily as a reliability and policy-enforcement risk on affected locked-down Linux hosts.

Researcher notes

The key defect is authorization context and timing: checking inside BPF helper execution used unrelated current tasks and placed audit in a hot path. Fix validation should focus on BPF verifier/load-time lockdown checks and absence of audit recursion or scheduler-lock deadlock paths.

Mitigation direction

  • Apply vendor kernel updates containing the upstream stable fixes.
  • Confirm distribution advisories before assuming version numbers map directly.
  • Restrict BPF tracing tool access on sensitive locked-down hosts.
  • Review SELinux lockdown policies after kernel update.
  • Monitor for audit floods, OOM events, and scheduler-related hangs.

Validation and detection

  • Inventory Linux kernel versions and vendor patch levels.
  • Check whether SELinux lockdown and BPF tracing are in use.
  • Verify the kernel includes one referenced stable fix commit or vendor backport.
  • Review audit logs for repeated lockdown denials during tracing.
  • Confirm observability tools still load expected BPF programs after patching.
Prepared
Confidence
medium
Sources
5

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cve · low confidence lookup

CVE-2021-47128 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Unknown
CVSS
Not scored
Known Exploited
No
Published
Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

0CVSS vectors
3Timeline events
2ADP providers
4Source links

SSVC decision data

CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: noTechnical Impact: partial

Vulnerability timeline

Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.

  1. CVE reservedCVE Program

    The CVE ID was reserved by the assigning CNA.

  2. CVE publishedCVE Program

    The CVE record was published.

  3. CVE updatedCVE Program

    The CVE record metadata indicates this as the latest update time.

ADP provider summaries

CISA-ADPCISA ADP Vulnrichment
other:ssvc
CVECVE Program Container
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
LinuxLinux59438b46471ae6cdfb761afc8c9beaf1e428a331, 59438b46471ae6cdfb761afc8c9beaf1e428a331, 59438b46471ae6cdfb761afc8c9beaf1e428a331unaffected
LinuxLinux5.6, 0, 5.10.43, 5.12.10, 5.13affected
Weakness

CWE details

No CWE listed

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.