{"id":"CVE-2021-47218","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nselinux: fix NULL-pointer dereference when hashtab allocation fails\n\nWhen the hash table slot array allocation fails in hashtab_init(),\nh-\u003esize is left initialized with a non-zero value, but the h-\u003ehtable\npointer is NULL. This may then cause a NULL pointer dereference, since\nthe policydb code relies on the assumption that even after a failed\nhashtab_init(), hashtab_map() and hashtab_destroy() can be safely called\non it. Yet, these detect an empty hashtab only by looking at the size.\n\nFix this by making sure that hashtab_init() always leaves behind a valid\nempty hashtab when the allocation fails.","modified":"2026-03-15T22:43:08.811351Z","published":"2024-04-10T19:15:48.860Z","related":["SUSE-SU-2024:1641-1","SUSE-SU-2024:1644-1","SUSE-SU-2024:1647-1","SUSE-SU-2024:1659-1","SUSE-SU-2024:1663-1"],"references":[{"type":"FIX","url":"https://git.kernel.org/stable/c/dc27f3c5d10c58069672215787a96b4fae01818b"},{"type":"FIX","url":"https://git.kernel.org/stable/c/83c8ab8503adf56bf68dafc7a382f4946c87da79"},{"type":"FIX","url":"https://git.kernel.org/stable/c/b17dd53cac769dd13031b0ca34f90cc65e523fab"}],"affected":[{"database_specific":{"unresolved_ranges":[{"events":[{"introduced":"5.8"},{"fixed":"5.10.82"}]},{"events":[{"introduced":"5.11"},{"fixed":"5.15.5"}]},{"events":[{"introduced":"0"},{"last_affected":"5.16-rc1"}]},{"events":[{"introduced":"0"},{"last_affected":"5.16-rc2"}]}],"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-47218.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"}]}