iio: chemical: scd30: Cleanup initializations and fix sign-extension bug
3Vexday Risk Score
No sign of exploitation. No public exploitation artifact known so far.
ssvc Trackepss 0.2%
exploitation probability
0.2%top 93% of all CVEs
observed exploitation
nono source reports it
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.
Affected products
Linux · LinuxReferences
https://git.kernel.org/stable/c/0ccff849bde90973e6c13a666f6ceab5c55b30d4https://git.kernel.org/stable/c/1821bcacd8ac5b214c53be16cbb8172bf193f0b6https://git.kernel.org/stable/c/40bb0fdb37f441c9c9f52bf58bbd8a0ca3cc9598https://git.kernel.org/stable/c/60d877910a43c305b5165131b258a17b1d772d57https://git.kernel.org/stable/c/82accdd57404399eddf3d56fd9beda7c61307388https://git.kernel.org/stable/c/8d4a46e971cf846bda98b20d4cabfa21c1276e5fhttps://git.kernel.org/stable/c/b131f0011dfef72350f4e3f11df94dc3e6b46065https://git.kernel.org/stable/c/d49ff54b2784aa56a7c97982de713604de89d23a