CVE-2025-38025: iio: adc: ad7606: check for NULL before calling sw_mode_config()
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
iio: adc: ad7606: check for NULL before calling sw_mode_config()
Check that the sw_mode_config function pointer is not NULL before calling it. Not all buses define this callback, which resulted in a NULL pointer dereference.
The Linux kernel CVE team has assigned CVE-2025-38025 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.13 with commit e571c1902116a376c96e59639820662d7d6a13da and fixed in 6.14.8 with commit c28ad63aa55eaadad2b1793b90bfbe7296cc03ba Issue introduced in 6.13 with commit e571c1902116a376c96e59639820662d7d6a13da and fixed in 6.15 with commit 5257d80e22bf27009d6742e4c174f42cfe54e425
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2025-38025
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/iio/adc/ad7606.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/c28ad63aa55eaadad2b1793b90bfbe7296cc03ba https://git.kernel.org/stable/c/5257d80e22bf27009d6742e4c174f42cfe54e425