CVE-2026-63931: iio: chemical: scd30: fix division by zero in write_raw
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
iio: chemical: scd30: fix division by zero in write_raw
Add a zero check for val2 before using it as a divisor when setting the sampling frequency. A user writing a zero fractional part to the sampling_frequency sysfs attribute triggers a division by zero in the kernel.
The Linux kernel CVE team has assigned CVE-2026-63931 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.9 with commit 64b3d8b1b0f5c16c19045785e4da8391ae35ec99 and fixed in 5.10.259 with commit 4748bce423a363bb8a85a624faeb8f54fe331611 Issue introduced in 5.9 with commit 64b3d8b1b0f5c16c19045785e4da8391ae35ec99 and fixed in 5.15.210 with commit 6308b812acdcac38cbfe1af0b1524c3375f408a5 Issue introduced in 5.9 with commit 64b3d8b1b0f5c16c19045785e4da8391ae35ec99 and fixed in 6.1.176 with commit c7a740bf75554b051fabb17596ca6e483d6e6d90 Issue introduced in 5.9 with commit 64b3d8b1b0f5c16c19045785e4da8391ae35ec99 and fixed in 6.6.143 with commit e85bc501947f5ae16dd9adc01162b76d55ab7962 Issue introduced in 5.9 with commit 64b3d8b1b0f5c16c19045785e4da8391ae35ec99 and fixed in 6.12.93 with commit d98c2e69aab905d1b19a69ffe584efa46a9efd42 Issue introduced in 5.9 with commit 64b3d8b1b0f5c16c19045785e4da8391ae35ec99 and fixed in 6.18.35 with commit 5e4d34092a5ebfbc3a45a180c76ecb1cdbbedd53 Issue introduced in 5.9 with commit 64b3d8b1b0f5c16c19045785e4da8391ae35ec99 and fixed in 7.0.12 with commit 2c50c017df97bfb425038efdfb8514c7bcd08564 Issue introduced in 5.9 with commit 64b3d8b1b0f5c16c19045785e4da8391ae35ec99 and fixed in 7.1 with commit 5aba4f94b225617a55fed442a70329b2ee19c0a5
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-2026-63931
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/chemical/scd30_core.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/4748bce423a363bb8a85a624faeb8f54fe331611 https://git.kernel.org/stable/c/6308b812acdcac38cbfe1af0b1524c3375f408a5 https://git.kernel.org/stable/c/c7a740bf75554b051fabb17596ca6e483d6e6d90 https://git.kernel.org/stable/c/e85bc501947f5ae16dd9adc01162b76d55ab7962 https://git.kernel.org/stable/c/d98c2e69aab905d1b19a69ffe584efa46a9efd42 https://git.kernel.org/stable/c/5e4d34092a5ebfbc3a45a180c76ecb1cdbbedd53 https://git.kernel.org/stable/c/2c50c017df97bfb425038efdfb8514c7bcd08564 https://git.kernel.org/stable/c/5aba4f94b225617a55fed442a70329b2ee19c0a5