CVE-2024-42089 ASoC: fsl-asoc-card: set priv->pdev before using it
A null pointer dereference in the Linux kernel's fsl-asoc-card driver can cause a system crash during device initialization.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-42089?
CVE-2024-42089 is a medium-severity vulnerability in Linux kernel, published on 29 Jul 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
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.
Weakness: CWE-476
Which versions are affected by CVE-2024-42089?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2024-42089?
Apply the vendor's patch.
Is CVE-2024-42089 being exploited?
There is no known exploitation of CVE-2024-42089 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as BELL-CVE-2024-42089, DEBIAN-CVE-2024-42089, GHSA-fphh-62qm-fm76, UBUNTU-CVE-2024-42089.