comedi: das16m1: Fix bit shift out of bounds
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 729988507680b2ce934bce61d9ce0ea7b235914c · < 076b13ee60eb01ed0d140ef261f95534562a3077| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
comedi: das16m1: Fix bit shift out of bounds
When checking for a supported IRQ number, the following test is used:
/* only irqs 2, 3, 4, 5, 6, 7, 10, 11, 12, 14, and 15 are valid */ 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.
From the CVE record · Linux
The Linux kernel’s comedi das16m1 driver does not check the userspace-supplied IRQ option before using it as a bit-shift amount. A local user can supply a negative or out-of-bounds value, causing an out-of-bounds bit shift; the input does not specify an authentication requirement or further impact.
Engineers running Linux kernels with the comedi das16m1 driver should check their systems; affected versions are not specified.