dpaa2-switch: add bounds check for if_id in IRQ handler
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 24ab724f8a4661b2dc8e696b41df93bdc108f7a1 · < 31a7a0bbeb006bac2d9c81a2874825025214b6d8| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
dpaa2-switch: add bounds check for if_id in IRQ handler
The IRQ handler extracts if_id from the upper 16 bits of the hardware status register and uses it to index into ethsw->ports[] without validation. Since if_id can be any 16-bit value (0-65535) but the ports array is only allocated with sw_attr.num_ifs elements, this can lead to an out-of-bounds read potentially.
Add a bounds check before accessing the array, consistent with the existing validation in dpaa2_switch_rx().
From the CVE record · Linux
The dpaa2-switch IRQ handler uses an interface ID from a hardware status register to index a ports array without checking its bounds. An out-of-range ID can cause an out-of-bounds read. The input does not establish whether an attacker can trigger this remotely or locally, or whether authentication or user interaction is required.
Engineers running Linux kernels with dpaa2-switch should check their versions; affected versions are not specified in the input.