iio: chemical: scd30: Cleanup initializations and fix sign-extension bug
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 64b3d8b1b0f5c16c19045785e4da8391ae35ec99 · < 82accdd57404399eddf3d56fd9beda7c61307388| No fix yet |
| Linux Linux |
|
|
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.
From the CVE record · Linux
The Linux kernel’s scd30 chemical sensor driver has a sign-extension bug that can corrupt a floating-point exponent. The input does not describe an attacker action or specify network access, authentication, or user-interaction requirements.
Engineers running Linux kernels with the scd30 chemical sensor driver should check their deployments; affected versions are not specified.