SecurityContext

CVE-2021-47218: Linux Kernel - NULL Pointer Dereference

  • Cve: CVE-2021-47218
  • Name: Linux Kernel - NULL Pointer Dereference
  • Description: 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.
  • Impact: Kernel crash or hang due to NULL pointer dereference, potentially leading to denial of service.
  • Remediation: Update to the latest Linux kernel version where this fix is included.
  • Vulnerability type: null_pointer_dereference
  • Vulnerability impact: denial_of_service
  • Requirement type: none
  • Labels source: projectdiscovery
  • Severity: medium
  • Cvss score: 5.5
  • Cvss vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
  • Epss score: 0.00225
  • Epss percentile: 0.13062
  • Assignee: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  • Published at: 2024-04-10T19:15:48Z
  • Age in days: 958
  • Modified at: 2026-06-17T04:16:56Z
  • Patch available: yes
  • References total: 3
  • Products total: 1
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2021-47218
  • Nvd status: analyzed
  • Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
  • Not known: requirements, hackerone

Cwe

IdName
CWE-476NULL Pointer Dereference

References

Same in every row:

  • Source: nvd
  • Tags: Patch
Url
https://git.kernel.org/stable/c/83c8ab8503adf56bf68dafc7a382f4946c87da79
https://git.kernel.org/stable/c/b17dd53cac769dd13031b0ca34f90cc65e523fab
https://git.kernel.org/stable/c/dc27f3c5d10c58069672215787a96b4fae01818b

Products

ProductAffectedPlatform boundSourcesUrl
linux:linux_kernel= 5.16 rc1; = 5.16 rc2; >= 5.11, < 5.15.5; >= 5.8, < 5.10.82nonvd/v1/products/linux/linux_kernel

Projects

RepositoryLink kindsIndexedUrl
torvalds/linuxcna_commit, commityes/v1/repositories/torvalds/linux

Index

  • Checked, none or zero: repositories, repositories high signal, packages

Exploitation

  • Authentication required: yes
  • Exposed hosts: 10038339
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, remote
  • Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports