comedi: das6402: Fix bit shift out of bounds
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 79e5e6addbb18bf56075f0ff552094a28636dd03 · < 3eab654f5d199ecd45403c6588cda63e491fcfca| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
comedi: das6402: Fix bit shift out of bounds
When checking for a supported IRQ number, the following test is used:
/* IRQs 2,3,5,6,7, 10,11,15 are valid for "enhanced" mode */ if ((1 << it->options[1]) & 0x8cec) {
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 das6402 driver uses an unchecked value from userspace when testing whether an IRQ number is supported. A local user who supplies a negative or out-of-bounds value can trigger an out-of-bounds bit shift; the input does not specify any further impact or authentication requirements.
Engineers running Linux kernels with the comedi das6402 driver should check their versions; affected versions are not specified.