LiveActive security incident?Get immediate response
CVE Record

CVE-2021-47218: selinux: fix NULL-pointer dereference when hashtab allocation fails

In the Linux kernel, the following vulnerability has been resolved: selinux: fix NULL-pointer dereference when hashtab allocation fails When the hash table slot array allocation fails in hashtab_init(), h->size is left initialized with a non-zero value, but the h->htable pointer is NULL. This may then cause a NULL pointer dereference, since the policydb code relies on the assumption that even after a failed hashtab_init(), hashtab_map() and hashtab_destroy() can be safely called on it. Yet, these detect an empty hashtab only by looking at the size. Fix this by making sure that hashtab_init() always leaves behind a valid empty hashtab when the allocation fails.

UnknownCVSS not scoredNot KEV-listedUpdated
Glexia's TakeAutomated analysisunknown

Security readout for executives and security teams

Plain-English summary

This is a Linux kernel SELinux stability flaw. If a hash table allocation fails during policy handling, later cleanup or iteration code may dereference a NULL pointer. The sources do not provide CVSS, active exploitation, or a named workaround, so urgency is environment-dependent rather than an internet-wide emergency.

Executive priority

Handle through normal kernel patch management unless vendor guidance raises severity for your distribution. Prioritize sensitive or highly available Linux systems using SELinux. There is no source-backed evidence of active exploitation, but kernel crashes can still create operational risk.

Technical view

hashtab_init() could leave h->size nonzero while h->htable was NULL after slot-array allocation failure. policydb code treated failed initialization as a safely empty hashtab, and hashtab_map() or hashtab_destroy() could rely on size alone. The kernel fix ensures allocation failure leaves a valid empty hashtab state.

Likely exposure

Exposure is limited to Linux systems running affected kernel versions identified by the CVE record. SELinux-related policy database handling is the relevant component. The source bundle does not prove remote reachability, default exploitability, or distribution-specific package status.

Exploitation context

The source bundle lists no KEV entry and provides no evidence of active exploitation. The described impact is a NULL pointer dereference after memory allocation failure. Practical exploitation depends on whether an attacker can influence the affected SELinux policydb path and failure condition, which is not established in the sources.

Researcher notes

The evidence supports a reliability flaw in SELinux hashtab error handling, not a proven privilege escalation or remote exploit. Missing data includes CVSS, CWE, trigger prerequisites, attacker control, and distribution package mapping. Avoid overstating impact without vendor analysis or reproducible local validation.

Mitigation direction

  • Check Linux vendor advisories for patched kernel packages or backports.
  • Update affected kernels to versions containing the referenced stable fixes.
  • Prioritize systems where SELinux is enabled and operationally important.
  • Track distribution package notes; upstream commit presence may not equal package status.
  • If patching is delayed, monitor vendor guidance for supported mitigations.

Validation and detection

  • Inventory Linux kernel versions across servers, appliances, containers, and images.
  • Confirm whether SELinux is enabled on potentially affected systems.
  • Map installed kernels to vendor advisories or the referenced stable commits.
  • Review kernel crash records for SELinux policydb NULL dereference symptoms.
  • Document distribution-specific backport evidence before marking fixed.
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-47218 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: total

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
LinuxLinux03414a49ad5f3c56988c36d2070e402ffa17feaf, 03414a49ad5f3c56988c36d2070e402ffa17feaf, 03414a49ad5f3c56988c36d2070e402ffa17feafunaffected
LinuxLinux5.8, 0, 5.10.82, 5.15.5, 5.16affected
Weakness

CWE details

No CWE listed

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