comedi: pcl812: Fix bit shift out of bounds
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ fcdb427bc7cf5e9e5d7280cf09c08dec49b49432 · < a27e27eee313fe1c450b6af1e80e64412546cab4| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
comedi: pcl812: Fix bit shift out of bounds
When checking for a supported IRQ number, the following test is used:
if ((1 << it->options[1]) & board->irq_bits) {
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 pcl812 driver uses an unchecked value from userspace when testing whether an IRQ is supported. A local user can supply a negative or out-of-range shift amount, causing an out-of-bounds bit shift.
Engineers running Linux kernels with the comedi pcl812 driver should check whether their kernel includes the fix; affected versions were not provided.