CVE-2026-64497: iio: chemical: scd30: Cleanup initializations and fix sign-extension bug

Greg Kroah-Hartman <[email protected]> Sat, 25 Jul 2026 10:51:54 +0200
Newsgroups org.kernel.vger.linux-cve-announce
Message-ID <2026072551-CVE-2026-64497-00c3@gregkh>
From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

iio: chemical: scd30: Cleanup initializations and fix sign-extension bug

Include linux/bitfield.h for FIELD_GET().

Create new macros for bit manipulation in combination with manual bit
manipulation being replaced with FIELD_GET().

The current variable declaration and initializations are barely readable
and use comma separations across multiple lines. Refactor the
initializations so that mantissa and exp have separate declarations and
sign gets initialized later.

In addition (and due to the nature of the cleanup), fix a sign-extension
bug where, float32 would get bitwise anded with ~BIT(31)
(which is 0xFFFFFFFF7FFFFFFF) which corrupted the exponent.

The Linux kernel CVE team has assigned CVE-2026-64497 to this issue.


Affected and fixed versions
===========================

	Issue introduced in 5.9 with commit 64b3d8b1b0f5c16c19045785e4da8391ae35ec99 and fixed in 5.10.261 with commit 0ccff849bde90973e6c13a666f6ceab5c55b30d4
	Issue introduced in 5.9 with commit 64b3d8b1b0f5c16c19045785e4da8391ae35ec99 and fixed in 5.15.212 with commit 1821bcacd8ac5b214c53be16cbb8172bf193f0b6
	Issue introduced in 5.9 with commit 64b3d8b1b0f5c16c19045785e4da8391ae35ec99 and fixed in 6.1.178 with commit 40bb0fdb37f441c9c9f52bf58bbd8a0ca3cc9598
	Issue introduced in 5.9 with commit 64b3d8b1b0f5c16c19045785e4da8391ae35ec99 and fixed in 6.6.145 with commit b131f0011dfef72350f4e3f11df94dc3e6b46065
	Issue introduced in 5.9 with commit 64b3d8b1b0f5c16c19045785e4da8391ae35ec99 and fixed in 6.12.96 with commit 8d4a46e971cf846bda98b20d4cabfa21c1276e5f
	Issue introduced in 5.9 with commit 64b3d8b1b0f5c16c19045785e4da8391ae35ec99 and fixed in 6.18.39 with commit 82accdd57404399eddf3d56fd9beda7c61307388
	Issue introduced in 5.9 with commit 64b3d8b1b0f5c16c19045785e4da8391ae35ec99 and fixed in 7.1.4 with commit d49ff54b2784aa56a7c97982de713604de89d23a
	Issue introduced in 5.9 with commit 64b3d8b1b0f5c16c19045785e4da8391ae35ec99 and fixed in 7.2-rc1 with commit 60d877910a43c305b5165131b258a17b1d772d57

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-64497
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/0ccff849bde90973e6c13a666f6ceab5c55b30d4
	https://git.kernel.org/stable/c/1821bcacd8ac5b214c53be16cbb8172bf193f0b6
	https://git.kernel.org/stable/c/40bb0fdb37f441c9c9f52bf58bbd8a0ca3cc9598
	https://git.kernel.org/stable/c/b131f0011dfef72350f4e3f11df94dc3e6b46065
	https://git.kernel.org/stable/c/8d4a46e971cf846bda98b20d4cabfa21c1276e5f
	https://git.kernel.org/stable/c/82accdd57404399eddf3d56fd9beda7c61307388
	https://git.kernel.org/stable/c/d49ff54b2784aa56a7c97982de713604de89d23a
	https://git.kernel.org/stable/c/60d877910a43c305b5165131b258a17b1d772d57