Bug 2191658 (CVE-2023-32254, ZDI-23-702, ZDI-CAN-20592)

Summary: CVE-2023-32254 kernel: ksmbd: tree connection race condition remote code execution vulnerability
Product: [Other] Security Response Reporter: Mauro Matteo Cascella <mcascell>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: acaringi, allarkin, bhu, chwhite, crwood, dbohanno, ddepaula, debarbos, dfreiber, dvlasenk, ezulian, hkrzesin, jarod, jburrell, jdenham, jfaracco, jferlan, jforbes, jlelli, joe.lawrence, jshortt, jstancek, jwyatt, kcarcia, kernel-mgr, ldoskova, lgoncalv, lleshchi, lzampier, nmurray, ptalbert, qzhao, rogbas, rrobaina, rvrbovsk, rysulliv, scweaver, security-response-team, tyberry, vkumar, walters, wcosta, williams, wmealing, ycote
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kernel 6.4-rc1 Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the Linux kernel's ksmbd, a high-performance in-kernel SMB server. The specific flaw exists within the processing of SMB2_TREE_DISCONNECT commands. The issue results from the lack of proper locking when performing operations on an object. An attacker can leverage this vulnerability to execute code in the context of the kernel.
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-22 08:18:44 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:    
Bug Blocks: 2190273    

Description Mauro Matteo Cascella 2023-04-28 17:17:12 UTC
An improper locking issue leading to a race condition vulnerability was found in ksmbd, a high-performance in-kernel SMB server. Quoting ZDI security advisory [1]:

"This vulnerability allows remote attackers to execute arbitrary code on affected installations of Linux Kernel. Authentication is not required to exploit this vulnerability, but only systems with ksmbd enabled are vulnerable.

The specific flaw exists within the processing of SMB2_TREE_DISCONNECT commands. The issue results from the lack of proper locking when performing operations on an object. An attacker can leverage this vulnerability to execute code in the context of the kernel."

[1] https://www.zerodayinitiative.com/advisories/ZDI-CAN-20592/

Comment 1 Mauro Matteo Cascella 2023-05-22 08:10:54 UTC
Upstream fix:
https://github.com/torvalds/linux/commit/30210947a343b6b3ca13adc9bfc88e1543e16dd5

Comment 2 Mauro Matteo Cascella 2023-05-22 08:19:01 UTC
No Red Hat products are affected by this flaw, as the ksmbd code is not included in any shipping kernel release.