Bug 2125879 (CVE-2022-3170)

Summary: CVE-2022-3170 kernel: ALSA: control: out-of-bounds access in get_ctl_id_hash()
Product: [Other] Security Response Reporter: Mauro Matteo Cascella <mcascell>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: acaringi, adscvr, airlied, alciregi, bhu, brdeoliv, bskeggs, ddepaula, dhoward, dvlasenk, fhrbata, hdegoede, hkrzesin, hpa, jarod, jarodwilson, jfaracco, jferlan, jforbes, jglisse, joe.lawrence, jonathan, josef, jshortt, jstancek, jwboyer, kcarcia, kernel-maint, kernel-mgr, lgoncalv, linville, lzampier, masami256, mchehab, nmurray, ptalbert, rvrbovsk, scweaver, steved, walters
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kernel 6.0-rc4 Doc Type: ---
Doc Text:
An out-of-bounds access issue was found in the Linux kernel sound subsystem. It could occur when the 'id->name' provided by the user did not end with '\0'. A privileged local user could pass a specially crafted name through ioctl() interface and crash the system or potentially escalate their privileges on the system.
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-09-11 13:43:27 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: 2121805    

Description Mauro Matteo Cascella 2022-09-11 13:31:33 UTC
Since the user can control the arguments provided to the kernel by the ioctl() system call, an out-of-bounds bug occurs when the 'id->name' provided by the user does not end with '\0'.

Upstream commits:
https://github.com/torvalds/linux/commit/6ab55ec0a938c7f943a4edba3d6514f775983887
https://github.com/torvalds/linux/commit/5934d9a0383619c14df91af8fd76261dc3de2f5f

Comment 1 Mauro Matteo Cascella 2022-09-11 13:43:27 UTC
Red Hat Enterprise Linux 6, 7, 8 and 9 are not affected by this flaw as they did not include support for faster lookup of control elements (upstream commit that introduced the bug): https://github.com/torvalds/linux/commit/c27e1ef.