Bug 2301512 (CVE-2024-42146)

Summary: CVE-2024-42146 kernel: drm/xe: Add outer runtime_pm protection to xe_live_ktest@xe_dma_buf
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security DevOps Team <prodsec-dev>
Status: NEW --- QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: dfreiber, drow, jburrell, vkumar
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kernel 6.9.9, kernel 6.10 Doc Type: If docs needed, set a value
Doc Text:
Any kunit doing any memory access should get their own runtime_pm outer references since they don't use the standard driver API entries.
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: 2302011    
Bug Blocks:    

Description OSIDB Bzimport 2024-07-30 08:38:51 UTC
In the Linux kernel, the following vulnerability has been resolved:

drm/xe: Add outer runtime_pm protection to xe_live_ktest@xe_dma_buf

Any kunit doing any memory access should get their own runtime_pm
outer references since they don't use the standard driver API
entries. In special this dma_buf from the same driver.

Found by pre-merge CI on adding WARN calls for unprotected
inner callers:

<6> [318.639739]     # xe_dma_buf_kunit: running xe_test_dmabuf_import_same_driver
<4> [318.639957] ------------[ cut here ]------------
<4> [318.639967] xe 0000:4d:00.0: Missing outer runtime PM protection
<4> [318.640049] WARNING: CPU: 117 PID: 3832 at drivers/gpu/drm/xe/xe_pm.c:533 xe_pm_runtime_get_noresume+0x48/0x60 [xe]

Comment 1 Mauro Matteo Cascella 2024-07-31 10:46:13 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2024073032-CVE-2024-42146-cbd0@gregkh/T

Comment 2 Mauro Matteo Cascella 2024-07-31 10:46:35 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 2302011]