comedi: aio_iiro_16: Fix bit shift out of bounds
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ ad7a370c8be47247f68f7187cc82f4f25a347116 · < e0f3c0867d7d231c70984f05c97752caacd0daba| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
comedi: aio_iiro_16: Fix bit shift out of bounds
When checking for a supported IRQ number, the following test is used:
if ((1 << it->options[1]) & 0xdcfc) {
However, `it->options[i]` is an unchecked `int` value from userspace, so the shift amount could be negative or out of bounds. Fix the test by requiring `it->options[1]` to be within bounds before proceeding with the original test. Valid `it->options[1]` values that select the IRQ will be in the range [1,15]. The value 0 explicitly disables the use of interrupts.
From the CVE record · Linux
The Linux kernel's comedi aio_iiro_16 driver uses an unchecked value from userspace as a bit-shift amount when checking an IRQ number. A local user supplying a negative or out-of-bounds value can trigger an out-of-bounds shift; the input does not specify any further impact.
Engineers running Linux kernels with the comedi aio_iiro_16 driver should check whether their kernel includes the fix; affected versions are not specified.