---
title: "CVE-2021-47218"
canonical_url: "https://pkgseek.com/security/CVE-2021-47218"
locale: "en"
source: "pkgseek"
entity_type: "cve"
severity: "medium"
---

# CVE-2021-47218

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-&gt;size is left initialized with a non-zero value, but the h-&gt;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() a…

CVE-2021-47218 is rated MEDIUM, with 17 indexed affected package builds across 1 distributions.

- **Severity / Score**: MEDIUM
- **Affected builds**: 17
- **Affected distros**: 1
- **Distros with fixed_in**: None recorded in sample

## Affected Packages

| Distribution | Release | Package | Version | Fixed In |
| --- | --- | --- | --- | --- |
| Ubuntu | focal | linux-buildinfo-5.6.0-1007-oem | 5.6.0-1007.7 | — |
| Ubuntu | focal | linux-headers-5.6.0-1007-oem | 5.6.0-1007.7 | — |
| Ubuntu | focal | linux-image-unsigned-5.6.0-1007-oem | 5.6.0-1007.7 | — |
| Ubuntu | focal | linux-modules-5.6.0-1007-oem | 5.6.0-1007.7 | — |
| Ubuntu | focal | linux-oem-5.6-headers-5.6.0-1007 | 5.6.0-1007.7 | — |
| Ubuntu | focal | linux-oem-5.6-tools-5.6.0-1007 | 5.6.0-1007.7 | — |
| Ubuntu | focal | linux-oem-5.6-tools-common | 5.6.0-1007.7 | — |
| Ubuntu | focal | linux-oem-5.6-tools-host | 5.6.0-1007.7 | — |
| Ubuntu | focal | linux-tools-5.6.0-1007-oem | 5.6.0-1007.7 | — |
| Ubuntu | jammy | linux-buildinfo-5.17.0-1003-oem | 5.17.0-1003.3 | — |
| Ubuntu | jammy | linux-headers-5.17.0-1003-oem | 5.17.0-1003.3 | — |
| Ubuntu | jammy | linux-image-unsigned-5.17.0-1003-oem | 5.17.0-1003.3 | — |
| Ubuntu | jammy | linux-modules-5.17.0-1003-oem | 5.17.0-1003.3 | — |
| Ubuntu | jammy | linux-oem-5.17-headers-5.17.0-1003 | 5.17.0-1003.3 | — |
| Ubuntu | jammy | linux-oem-5.17-tools-5.17.0-1003 | 5.17.0-1003.3 | — |
| Ubuntu | jammy | linux-oem-5.17-tools-host | 5.17.0-1003.3 | — |
| Ubuntu | jammy | linux-tools-5.17.0-1003-oem | 5.17.0-1003.3 | — |
