ASoC: fsl-asoc-card: set priv->pdev before using it
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 708b4351f08c08ea93f773fb9197bdd3f3b08273 · < 29bc9e7c75398b0d12fc30955f2e9b2dd29ffaed| No fix yet |
| Linux Linux |
|
|
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.
From the CVE record · Linux
The Linux kernel’s fsl-asoc-card driver can dereference a NULL pointer during probing if an error is printed before priv->pdev is assigned. This can crash the driver; the input does not specify an attacker path, authentication requirement, or user interaction.
Engineers running Linux kernels with the fsl-asoc-card driver should check their systems; affected versions are not specified.