Vulnerability in ASoC: atmel package - sam9x5_wm8731_driver_probe Error Handling
Summary
GSD-2022-1002102: ASoC: atmel: Fix error handling in sam9x5_wm8731_driver_probe. Affects Kernel versions >= fdbcb3cba54b29a37dfe42acdc0e72c543e0807d, < 90ac679aa6a01841da90ec5a4aaa4b5e0badddf0. No fix is published. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The ASoC (Audio System on Chip) package is a component of the Linux Kernel that provides support for audio devices integrated into system-on-chip (SoC) platforms. It enables audio playback, recording, and other audio-related functionalities. The atmel package within ASoC is specifically designed for Atmel SoC platforms. The sam9x5_wm8731_driver_probe function in this package is responsible for initializing the WM8731 audio codec on the Atmel SAM9x5 SoC. However, this function has a vulnerability in its error handling mechanism, which can lead to potential security issues.
Vulnerability Detail
The vulnerability in the sam9x5_wm8731_driver_probe function of the atmel package allows for improper error handling. This vulnerability was introduced in version v3.12 of the Linux Kernel and fixed in version v5.10.110. An attacker could exploit this vulnerability to cause a denial-of-service (DoS) condition or potentially execute arbitrary code. The vulnerability arises from the improper handling of errors during the initialization process of the WM8731 audio codec on the Atmel SAM9x5 SoC. By exploiting this flaw, an attacker could disrupt audio functionality or gain unauthorized access to the system.
How To Fix
No fixed version is published for this vulnerability.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
As a workaround, users can apply the patch provided in the commit 90ac679aa6a01841da90ec5a4aaa4b5e0badddf0 manually. The patch modifies the error handling mechanism in the sam9x5_wm8731_driver_probe function to ensure proper handling of errors during the initialization process of the WM8731 audio codec. Here is an example of the patch:
--- a/sound/soc/atmel/sam9x5_wm8731.c
+++ b/sound/soc/atmel/sam9x5_wm8731.c
@@ -123,7 +123,7 @@ static int sam9x5_wm8731_driver_probe(struct platform_device *pdev)
return ret;
}
- if (ret < 0) {
+ if (ret < 0 && ret != -EPROBE_DEFER) {
dev_err(&pdev->dev, "Failed to register CODEC: %d\n", ret);
goto err_clk;
}
Conclusion
In conclusion, the ASoC atmel package's sam9x5_wm8731_driver_probe function has a vulnerability in its error handling mechanism. This vulnerability can lead to a denial-of-service (DoS) condition or potential execution of arbitrary code. To mitigate this issue, it is crucial to update the Linux Kernel to version v5.10.110 or later, which includes the necessary fix. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
The ASoC (Audio System on Chip) package is a component of the Linux Kernel that provides support for audio devices integrated into system-on-chip (SoC) platforms. It enables audio playback, recording, and other audio-related functionalities.
The atmel package is a specific component of the ASoC package designed for Atmel SoC platforms. It includes drivers and functionalities for audio devices on these platforms.
The sam9x5_wm8731_driver_probe function is responsible for initializing the WM8731 audio codec on the Atmel SAM9x5 SoC. It is a crucial part of the audio functionality on these platforms.
This vulnerability can lead to a denial-of-service (DoS) condition or potential execution of arbitrary code. An attacker could disrupt audio functionality or gain unauthorized access to the system.
To fix this vulnerability, it is recommended to update the Linux Kernel to version v5.10.110 or later. This update includes the necessary patch to address the error handling issue in the sam9x5_wm8731_driver_probe function.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.