Bug 2282469 (CVE-2021-47312)

Summary: CVE-2021-47312 kernel: netfilter: nf_tables: Fix dereference of null pointer flow
Product: [Other] Security Response Reporter: ybuenos
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, psutter, ptalbert, rkeshri, 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.13.5 Doc Type: If docs needed, set a value
Doc Text:
A vulnerability was found in the nf_tables function in the Linux kernel's netfilter subsystem. When certain conditions are met, a flow pointer can become NULL, leading to a crash when the system tries to access it during error handling. This can disrupt network filtering operations.
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: 2282500    

Description ybuenos 2024-05-22 12:18:31 UTC
In the Linux kernel, the following vulnerability has been resolved:

netfilter: nf_tables: Fix dereference of null pointer flow

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

Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2024052129-CVE-2021-47312-682b@gregkh/T

Comment 4 Phil Sutter 2024-05-23 22:55:38 UTC
Quoting the upstream CVE report:

Issue introduced in 5.13.2 with commit 09b1f676e2e0 and fixed in 5.13.5 with commit 70a5a1950cca

Note how these are stable branch commit hashes. Their description lists the vanilla hashes:

% git log -1 09b1f676e2e0 | grep -i upstream
    [ Upstream commit 3c5e44622011b9ea21bd425875dcccfc9a158f5f ]

% git log -1 70a5a1950cca | grep -i upstream
    commit 4ca041f919f13783b0b03894783deee00dbca19a upstream.

Checking the vanilla fix hash reveals it has been backported to RHEL8 already:

% kerneloscope downstream 4ca041f919f13783b0b03894783deee00dbca19a
4edd97432a05 (in rhel-8.5, rhel-8.6, rhel-8.7, rhel-8.8, rhel-8.9, rhel-8.10) netfilter: nf_tables: Fix dereference of null pointer flow

Also, the hash is part of upstream's v5.14 tag so none of RHEL9/C9S is affected.

Comment 5 Phil Sutter 2024-05-23 23:05:10 UTC
The faulty commit (vanilla hash 4ca041f919f1378) has been backported to only those RHEL8 trees which are listed above as having the fix as well:

% kerneloscope downstream 4ca041f919f13783b0b03894783deee00dbca19a
4edd97432a05 (in rhel-8.5, rhel-8.6, rhel-8.7, rhel-8.8, rhel-8.9, rhel-8.10) netfilter: nf_tables: Fix dereference of null pointer flow

Ergo, none of RHEL8 is affected either.

Comment 6 Alex 2024-06-09 17:27:11 UTC
The result of automatic check (that is developed by Alexander Larkin) for this CVE-2021-47312 is: CHECK	Maybe valid. Check manually. with impact LOW (that is an approximation based on flags REMOTE NULLPTR SIMPLEFIX NETFILTER LEAK ERRORPATH  ; these flags parsed automatically based on patch data). Such automatic check happens only for Low/Moderates (and only when not from reporter, but parsing already existing CVE). Highs always checked manually (I check it myself and then we check it again in Remediation team). In rare cases some of the Moderates could be increased to High later.