Bug 2300405 (CVE-2024-41037)

Summary: CVE-2024-41037 kernel: ASoC: SOF: Intel: hda: fix null deref on system suspend entry
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security DevOps Team <prodsec-dev>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: dfreiber, drow, jburrell, vkumar
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kernel 6.6.41, kernel 6.9.10, kernel 6.10 Doc Type: If docs needed, set a value
Doc Text:
A vulnerability was found in the Linux kernel, affecting Intel platforms using HDA DMA to manage the link DMA. When the system enters a suspend mode with an active stream, it can trigger a chain of function calls including hda_dai_suspend(), which calls the function hda_link_dma_cleanup() that clears the hext_stream->link_substream. However, afterwards the hda_ipc4_post_trigger() function is called and attempts to use the now-cleared snd_pcm_susbtream pointer, causing a NULL pointer dereference, potentially leading to system instability.
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: 2301538    
Bug Blocks:    

Description OSIDB Bzimport 2024-07-29 15:32:49 UTC
In the Linux kernel, the following vulnerability has been resolved:

ASoC: SOF: Intel: hda: fix null deref on system suspend entry

When system enters suspend with an active stream, SOF core
calls hw_params_upon_resume(). On Intel platforms with HDA DMA used
to manage the link DMA, this leads to call chain of

   hda_dsp_set_hw_params_upon_resume()
 -> hda_dsp_dais_suspend()
 -> hda_dai_suspend()
 -> hda_ipc4_post_trigger()

A bug is hit in hda_dai_suspend() as hda_link_dma_cleanup() is run first,
which clears hext_stream->link_substream, and then hda_ipc4_post_trigger()
is called with a NULL snd_pcm_substream pointer.

Comment 1 Mauro Matteo Cascella 2024-07-30 09:07:20 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2024072923-CVE-2024-41037-84b8@gregkh/T

Comment 2 Mauro Matteo Cascella 2024-07-30 09:07:40 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 2301538]