media: solo6x10: Check for out of bounds chip_id
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ faa4fd2a09517b39cc1f5d622453f97a59acfdac · < d29f33b2cf98e4901cd5457d1ee34062e808df73| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
media: solo6x10: Check for out of bounds chip_id
Clang with CONFIG_UBSAN_SHIFT=y noticed a condition where a signed type (literal "1" is an "int") could end up being shifted beyond 32 bits, so instrumentation was added (and due to the double is_tw286x() call seen via inlining), Clang decides the second one must now be undefined behavior and elides the rest of the function[1]. This is a known problem with Clang (that is still being worked on), but we can avoid the entire problem by actually checking the existing max chip ID, and now there is no runtime instrumentation added at all since everything is known to be within bounds.
Additionally use an unsigned value for the shift to remove the instrumentation even without the explicit bounds checking.
[hverkuil: fix checkpatch warning for is_tw286x]
From the CVE record · Linux
The Linux kernel’s solo6x10 media driver did not check whether chip_id exceeded its existing maximum before using it in a shift. With Clang and CONFIG_UBSAN_SHIFT=y, an out-of-bounds value could trigger undefined behavior and cause Clang to elide part of a function. The input does not establish how an attacker could supply that value or whether authentication or user interaction is required.
Engineers running the Linux kernel with the solo6x10 media driver should check their affected versions; no version range was provided.