Bug 2300551 (CVE-2024-42089)

Summary: CVE-2024-42089 kernel: ASoC: fsl-asoc-card: set priv-->pdev before using it
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 4.19.317, kernel 5.4.279, kernel 5.10.221, kernel 5.15.162, kernel 6.1.97, kernel 6.6.37, kernel 6.9.8, kernel 6.10 Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the `fsl-asoc-card` driver in the Linux kernel. This issue was fixed by ensuring the `priv->pdev` pointer is initialized before use. Previously, `priv->pdev` was used in the `fsl_asoc_card_audmux_init()` function before being assigned, potentially leading to a NULL pointer dereference and subsequent crashes.
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: 2301741, 2307208    
Bug Blocks:    

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

ASoC: fsl-asoc-card: set priv->pdev before using it

priv->pdev pointer was set after being used in
fsl_asoc_card_audmux_init().
Move this assignment at the start of the probe function, so
sub-functions can correctly use pdev through priv.

fsl_asoc_card_audmux_init() dereferences priv->pdev to get access to the
dev struct, used with dev_err macros.
As priv is zero-initialised, there would be a NULL pointer dereference.
Note that if priv->dev is dereferenced before assignment but never used,
for example if there is no error to be printed, the driver won't crash
probably due to compiler optimisations.

Comment 1 Mauro Matteo Cascella 2024-07-30 17:28:24 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2024072945-CVE-2024-42089-811c@gregkh/T

Comment 2 Mauro Matteo Cascella 2024-07-30 17:28:46 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 2301741]