ASoC: ops: Reject out of bounds values in snd_soc_put_volsw() - Kernel

Kernel Updated 02 Oct 2025

Summary

27/02/2022
N/A
No i
Unrated
Not published

GSD-2022-1000651: ASoC: ops: Reject out of bounds values in snd_soc_put_volsw(). Affects Kernel versions < bb72d2dda85564c66d909108ea6903937a41679d. No fix is published. How to fix ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The Kernel is a fundamental component of the Linux operating system that provides core functionalities and interfaces with hardware devices. It acts as a bridge between the hardware and software layers, facilitating communication and resource management. The ASoC (Audio System on Chip) subsystem within the Kernel is responsible for handling audio-related operations and providing support for various audio codecs and devices. One of the functions in the ASoC subsystem, snd_soc_put_volsw(), is used to set the volume switch values for audio devices. However, a vulnerability has been discovered in this function that allows out of bounds values to be accepted, potentially leading to unexpected behavior or security issues.

Vulnerability Detail

The vulnerability in snd_soc_put_volsw() arises from a lack of proper input validation. When setting the volume switch values, the function fails to reject out of bounds values, allowing them to be accepted without any checks. This can result in various issues depending on the specific use case. For example, if the volume switch values control the amplification level, accepting out of bounds values could lead to excessive amplification, potentially damaging audio equipment or causing distortion. In a security context, accepting out of bounds values could be exploited to manipulate audio output or trigger buffer overflows, leading to potential code execution or privilege escalation.

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

If updating the Kernel is not immediately feasible, a temporary workaround can be implemented by modifying the code in snd_soc_put_volsw() to include explicit checks for out of bounds values. Here is an example of how the code can be modified:

// Original code
if (value >= 0 && value <= max_value) {
  // Set volume switch value
}

// Modified code
if (value >= 0 && value <= max_value) {
  // Set volume switch value
} else {
  // Reject out of bounds value
}

By adding the else block, any out of bounds value will be rejected and not processed further.

Conclusion

In conclusion, the ASoC function snd_soc_put_volsw() in the Kernel is vulnerable to accepting out of bounds values, which can have various consequences ranging from audio distortion to potential security issues. It is crucial to update the Kernel to version v5.16.8 or later to fix this vulnerability. If immediate updating is not possible, a temporary workaround can be implemented by modifying the code in snd_soc_put_volsw(). For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for Kernel →

Share this vulnerability

FAQ

The impact of this vulnerability can vary depending on the specific use case. It could lead to audio distortion, damage to audio equipment, or even potential security issues such as code execution or privilege escalation.

You can use the Vulert Playground at Vulert Scanner to check if your system is affected by this vulnerability. Simply upload your package-lock.json file, and Vulert will analyze it for any open-source vulnerabilities, including this one.

Yes, a fix is available in Linux Kernel version v5.16.8. It is recommended to update the Kernel to this version or later to mitigate the vulnerability.

Yes, a temporary workaround is available. You can modify the code in snd_soc_put_volsw() to include explicit checks for out of bounds values. Please refer to the 'workaround' section for more details.

There are no known instances of this vulnerability being exploited in the wild. However, it is still important to apply the recommended fix or workaround to ensure the security and stability of your system.

Related vulnerabilities

Recent vulnerabilities recorded for Kernel.

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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback