CVE-2025-38259 Overview
CVE-2025-38259 is a resource management flaw in the Linux kernel's ASoC (ALSA System on Chip) wcd9335 codec driver. The driver acquires and enables regulator supplies during its probe path through wcd9335_parse_dt() and wcd9335_power_on_reset(), but it fails to release these supplies during error paths or driver unbind. The missing remove() callback causes leaked memory and unbalanced regulator enable counts. The issue is classified under [CWE-416] (Use After Free) due to the lifetime mismanagement of regulator resources tied to the device.
Critical Impact
A local, low-privileged attacker can trigger probe failures or unbind cycles to exhaust kernel resources, corrupt regulator state, and potentially destabilize the system, impacting confidentiality, integrity, and availability.
Affected Products
- Linux Kernel (multiple stable branches prior to the fix commits)
- Debian Linux 11.0
- Systems using the Qualcomm WCD9335 audio codec via the ASoC subsystem
Discovery Timeline
- 2025-07-09 - CVE-2025-38259 published to NVD
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2025-38259
Vulnerability Analysis
The wcd9335 codec driver manages regulator supplies for the Qualcomm WCD9335 audio codec. During probe, it calls regulator_bulk_get() and regulator_bulk_enable() on all supplies but does not pair these with matching release and disable calls in either the error handling paths of the probe function or in a driver unbind handler. No remove() callback exists in the driver.
Each failed probe attempt leaks the allocated regulator bulk data and increments the regulator enable reference count without decrement. Repeated bind and unbind operations compound this state, leading to kernel memory exhaustion and inconsistent power sequencing for the audio hardware.
The upstream fix replaces the manual acquisition sequence with devm_regulator_bulk_get_enable(), which ties supply lifetime to the device via the devres framework. This ensures automatic cleanup on both probe error and unbind.
Root Cause
The root cause is unbalanced resource acquisition. The driver used non-managed regulator_bulk_get() and regulator_bulk_enable() APIs without providing the corresponding release logic. Combined with the absent remove() callback, any exit path other than a successful probe leaves regulators enabled and their descriptor memory allocated indefinitely.
Attack Vector
Exploitation requires local access with low privileges on a system that binds the wcd9335 driver, typically Qualcomm-based Linux platforms. An attacker with the ability to trigger driver bind/unbind cycles through sysfs or by inducing probe failures can repeatedly leak regulator state. Sustained abuse can produce denial of service and unstable hardware state. Kernel memory corruption stemming from the underlying use-after-free class also creates a path toward higher-impact integrity and confidentiality effects on affected kernels.
The vulnerability manifests entirely within kernel probe and unbind handling. See the Kernel Git Commit Change for the fix implementation details.
Detection Methods for CVE-2025-38259
Indicators of Compromise
- Repeated wcd9335 probe failure messages in dmesg combined with growing kernel memory usage over time.
- Unbalanced regulator enable count warnings emitted by the regulator core, referencing supplies used by the WCD9335 codec.
- Unexpected audio subsystem instability or persistent power state on the codec after driver unbind operations.
Detection Strategies
- Audit installed kernel versions against the fix commits listed under vendor advisories, and flag hosts on unpatched stable branches.
- Monitor kernel logs for wcd9335-related probe errors and regulator subsystem warnings, correlating with slab allocator growth.
- Track driver bind/unbind events on sysfs paths under /sys/bus/platform/drivers/wcd9335-codec/ to identify anomalous cycling by non-administrative users.
Monitoring Recommendations
- Ingest dmesg and journald kernel output into a centralized log platform and alert on repeated regulator_disable imbalance messages.
- Baseline kernel slab consumption on affected Qualcomm-based systems and alert on sustained growth without workload justification.
- Restrict and log write access to driver bind/unbind interfaces in sysfs to detect abuse attempts.
How to Mitigate CVE-2025-38259
Immediate Actions Required
- Apply the upstream stable kernel updates that include the fix converting wcd9335 to devm_regulator_bulk_get_enable().
- For Debian 11 systems, install the kernel updates referenced in the Debian LTS Announcement.
- Inventory Qualcomm-based Linux devices that load the wcd9335 driver and prioritize them for patching.
- Restrict local user privileges and access to driver bind/unbind sysfs interfaces.
Patch Information
The fix is distributed across multiple stable kernel commits: 9079db287fc3, 9830ef1803a5, a8795f3cd289, b86280aaa23c, and edadaf4239c1. Debian users should upgrade via the Debian LTS Announcement.
Workarounds
- Blacklist the wcd9335 kernel module on systems where the codec is not required, using /etc/modprobe.d/ configuration.
- Prevent unprivileged users from triggering driver bind/unbind by tightening permissions on /sys/bus/platform/drivers/wcd9335-codec/.
- Reboot affected systems after suspected leak events to reset regulator reference counts until patches are deployed.
# Blacklist the wcd9335 driver until the kernel is patched
echo "blacklist snd-soc-wcd9335" | sudo tee /etc/modprobe.d/blacklist-wcd9335.conf
sudo update-initramfs -u
# Restrict access to platform driver bind/unbind interfaces
sudo chmod 600 /sys/bus/platform/drivers/wcd9335-codec/bind
sudo chmod 600 /sys/bus/platform/drivers/wcd9335-codec/unbind
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

