CVE-2026-98658: iio: proximity: aw96103: validate firmware data length
In the Linux kernel, the following vulnerability has been resolved:
iio: proximity: aw96103: validate firmware data length
The firmware parser reads a length from the binary header and then uses it to walk six-byte register/value entries. A truncated firmware image can make the parser read beyond the copied firmware buffer. A value smaller than the four-byte count field also underflows, producing a very large length.
Read the little-endian field with getunalignedle32(), as previously proposed by David Lechner. Validate the header size, reject an underflowed length, ensure the resulting payload is contained in the firmware image, and require it to contain whole register/value entries.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In the aw96103 firmware parser, read the little-endian length field with get_unaligned_le32(), validate that the firmware data is at least large enough to contain the four-byte count field, reject oversized or underflowed lengths, ensure the resulting payload remains within the copied firmware buffer, and require the payload length to contain only whole six-byte register/value entries.
Event History
Frequently Asked Questions
What conditions are required to trigger the out-of-bounds read?
The AW96103 firmware parser must process a malformed or truncated firmware image. The image can declare a payload length that extends beyond the copied firmware buffer, is smaller than the four-byte count field, or does not contain a whole number of six-byte register/value entries.
What checks does the fix add?
The fix validates the firmware header size, rejects lengths that would underflow after the count field, verifies that the payload remains within the firmware image, and requires complete six-byte register/value entries. It also reads the little-endian length field with get_unaligned_le32().