Bug 2252731 (CVE-2023-6931)

Summary: CVE-2023-6931 kernel: Out of boundary write in perf_read_group() as result of overflow a perf_event's read_size
Product: [Other] Security Response Reporter: Alex <allarkin>
Component: vulnerabilityAssignee: Product Security <prodsec-ir-bot>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: acaringi, allarkin, bhu, chwhite, cye, cyin, dbohanno, debarbos, dfreiber, drow, dvlasenk, ezulian, hkrzesin, jarod, jburrell, jdenham, jfaracco, jforbes, jlelli, joe.lawrence, jpoimboe, jshortt, jstancek, jwyatt, kcarcia, ldoskova, lgoncalv, lzampier, michal.skrivanek, mmilgram, mperina, mstowell, nmurray, ptalbert, rgatica, rkeshri, rogbas, rparrazo, rrobaina, rvrbovsk, rysulliv, sbonazzo, scweaver, security-response-team, tglozar, tyberry, vkumar, wcosta, williams, wmealing, xiaoyali, ycote, ykopkova, zhijwang
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 flaw was found in the Linux kernel's Performance Events system component. A condition can be triggered that allows data to be written past the end or before the beginning of the intended memory buffer. This may lead to a system crash, code execution, or local privilege escalation.
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: 2256503    
Bug Blocks: 2252725, 2255284    

Description Alex 2023-12-04 11:03:32 UTC
A flaw was found in the Linux kernel. It is possible to overflow a perf_event's read_size, causing an out-of-bounds write in perf_read_group(). The check meant to prevent such an overflow in perf_event_validate_size() does not account for groups of events with mixed read_format values. The flaw can be triggered with events created with PERF_FORMAT_GROUP or events added with PERF_FORMAT_GROUP after some preconditions.

The bug was introduced around fa8c269353d5 ("perf/core: Invert perf_read_group() loops").
Fixes: a723968c0ed3 ("perf: Fix u16 overflows").

Reference:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=382c27f4ed28f803b1f1473ac2d8db0afc795a1b

Comment 5 Alex 2023-12-26 12:01:17 UTC
*** Bug 2255286 has been marked as a duplicate of this bug. ***

Comment 21 errata-xmlrpc 2024-02-21 00:27:38 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.6 Extended Update Support

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

Comment 23 errata-xmlrpc 2024-02-28 12:34:29 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.2 Extended Update Support

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

Comment 24 errata-xmlrpc 2024-02-28 12:41:53 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.2 Extended Update Support

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

Comment 27 errata-xmlrpc 2024-03-19 17:27:34 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.8 Extended Update Support

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

Comment 28 errata-xmlrpc 2024-04-02 15:55:31 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

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

Comment 29 errata-xmlrpc 2024-04-02 17:21:42 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

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

Comment 30 errata-xmlrpc 2024-04-16 14:53:44 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.0 Extended Update Support

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

Comment 31 errata-xmlrpc 2024-04-16 15:03:54 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.0 Extended Update Support

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

Comment 34 errata-xmlrpc 2024-04-30 10:14:17 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

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