Bug 2238312 (CVE-2023-4881, ZDI-CAN-21950, ZDI-CAN-21951, ZDI-CAN-21961)

Summary: CVE-2023-4881 kernel: netfilter: stack out-of-bounds write in nft_exthdr ip/tcp/sctp functions
Product: [Other] Security Response Reporter: Mauro Matteo Cascella <mcascell>
Component: vulnerabilityAssignee: Product Security <prodsec-ir-bot>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: acaringi, allarkin, bhu, chwhite, dbohanno, debarbos, dfreiber, dvlasenk, ezulian, hkrzesin, jarod, jburrell, jdenham, jfaracco, jforbes, jlelli, joe.lawrence, jshortt, jstancek, jwyatt, kcarcia, ldoskova, lgoncalv, lleshchi, lzampier, nmurray, ptalbert, rogbas, rrobaina, rvrbovsk, rysulliv, scweaver, tglozar, tyberry, vkumar, walters, wcosta, williams, wmealing, ycote
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
A stack based out-of-bounds write flaw was found in the netfilter subsystem in the Linux kernel. If the expression length is a multiple of 4 (register size), the `nft_exthdr_eval` family of functions writes 4 NULL bytes past the end of the `regs` argument, leading to stack corruption and potential information disclosure or a denial of service.
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-09-20 17:38:02 UTC 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: 2238313    
Bug Blocks: 2238286    

Description Mauro Matteo Cascella 2023-09-11 12:15:49 UTC
A stack based out-of-bounds write was found in the netfilter subsystem in the Linux kernel. If priv->len is a multiple of 4, then dst[len / 4] can write past the destination array which leads to stack corruption.

Upstream patch:
https://lore.kernel.org/all/20230906162525.11079-2-fw@strlen.de/

Comment 1 Mauro Matteo Cascella 2023-09-11 12:16:17 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 2238313]