Bug 2274568 (CVE-2021-47218)

Summary: CVE-2021-47218 kernel: selinux: fix NULL-pointer dereference when hashtab allocation fails
Product: [Other] Security Response Reporter: Marco Benatto <mbenatto>
Component: vulnerabilityAssignee: Product Security <prodsec-ir-bot>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: acaringi, allarkin, aquini, bhu, chwhite, cye, cyin, dbohanno, debarbos, dfreiber, drow, dvlasenk, esandeen, ezulian, hkrzesin, jarod, jburrell, jdenham, jfaracco, jlelli, joe.lawrence, jshortt, jstancek, jwyatt, kcarcia, ldoskova, lgoncalv, lzampier, mleitner, mmilgram, mstowell, nmurray, ptalbert, rparrazo, rrobaina, rvrbovsk, rysulliv, scweaver, sidakwo, sukulkar, tglozar, tyberry, vkumar, wcosta, williams, wmealing, ycote, ykopkova, zhijwang
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kernel 5.10.82, kernel 5.15.5, kernel 5.16 Doc Type: If docs needed, set a value
Doc Text:
A vulnerability was found in the Linux kernel, related to SELinux. This issue occurs when a hash table allocation fails during the hashtab_init() function. When this failure happens, the system leaves the hash table (h->size) initialized with a non-zero value, but the h->htable pointer remains null. This can result in a null pointer dereference when SELinux's policy database tries to use the hash table, relying on the assumption that it is valid. This situation can cause system crashes or unexpected behavior.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2274606    

Description Marco Benatto 2024-04-11 19:11:58 UTC
In the Linux kernel, the following vulnerability has been resolved:

selinux: fix NULL-pointer dereference when hashtab allocation fails

The Linux kernel CVE team has assigned CVE-2021-47218 to this issue.

Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2024041006-CVE-2021-47218-cdc8@gregkh/T