Bug 2188396 (CVE-2023-2194)

Summary: CVE-2023-2194 kernel: i2c: out-of-bounds write in xgene_slimpro_i2c_xfer()
Product: [Other] Security Response Reporter: Mauro Matteo Cascella <mcascell>
Component: vulnerabilityAssignee: Nobody <nobody>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: acaringi, allarkin, bhu, chwhite, crwood, darcari, dbohanno, ddepaula, debarbos, dfreiber, dvlasenk, ezulian, hkrzesin, jarod, jburrell, jdenham, jfaracco, jferlan, jforbes, jlelli, joe.lawrence, jshortt, jstancek, jwyatt, kcarcia, kernel-mgr, ldoskova, lgoncalv, lzampier, nmurray, ptalbert, qzhao, rogbas, rrobaina, rvrbovsk, rysulliv, scweaver, tyberry, vkumar, walters, wcosta, williams, wmealing, ycote
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kernel 6.3-rc4 Doc Type: If docs needed, set a value
Doc Text:
An out-of-bounds write vulnerability was found in the Linux kernel's SLIMpro I2C device driver. The userspace "data->block[0]" variable was not limited to a number between 0-255 and was used as the size of a memcpy, possibly writing beyond the end of dma_buffer. This issue could allow a local privileged user to crash the system or potentially achieve code execution.
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: 2188397, 2188406, 2188407, 2188408, 2188409, 2189482, 2189487, 2190002, 2190003    
Bug Blocks: 2186508    

Description Mauro Matteo Cascella 2023-04-20 15:32:55 UTC
An out-of-bounds write vulnerability was found in the Linux kernel's SLIMpro I2C device driver. The flaw lies in the xgene_slimpro_i2c_xfer() function. Quoting the upstream commit below: "The data->block[0] variable comes from user and is a number between 0-255. Without proper check, the variable may be very large to cause an out-of-bounds when performing memcpy in slimpro_i2c_blkwr."

Upstream fix:
https://github.com/torvalds/linux/commit/92fbb6d1296f

Comment 1 Mauro Matteo Cascella 2023-04-20 15:34:24 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 2188397]

Comment 6 Justin M. Forbes 2023-04-25 20:06:01 UTC
This was fixed for Fedora with the 6.2.9 stable kernel updates.

Comment 7 errata-xmlrpc 2023-06-21 14:38:33 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2023:3708 https://access.redhat.com/errata/RHSA-2023:3708

Comment 8 errata-xmlrpc 2023-06-21 14:39:09 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2023:3723 https://access.redhat.com/errata/RHSA-2023:3723

Comment 10 errata-xmlrpc 2023-08-08 07:54:15 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2023:4541 https://access.redhat.com/errata/RHSA-2023:4541

Comment 11 errata-xmlrpc 2023-08-08 08:19:47 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2023:4517 https://access.redhat.com/errata/RHSA-2023:4517

Comment 14 errata-xmlrpc 2024-01-24 16:43:33 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.6 Extended Update Support

Via RHSA-2024:0412 https://access.redhat.com/errata/RHSA-2024:0412