HIGH
dpaa2-switch NumIfs Overflow
CVE-2026-43205
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
KernelScan AI6.0MEDIUM
01Description
In the Linux kernel, the following vulnerability has been resolved: dpaa2-switch: validate num_ifs to prevent out-of-bounds write The driver obtains sw_attr.num_ifs from firmware via dpsw_get_attributes() but never validates it against DPSW_MAX_IF (64). This value controls iteration in dpaa2_switch_fdb_get_flood_cfg(), which writes port indices into the fixed-size cfg->if_id[DPSW_MAX_IF] array. When firmware reports num_ifs >= 64, the loop can write past the array bounds. Add a bound check for num_ifs in dpaa2_switch_init(). dpaa2_switch_fdb_get_flood_cfg() appends the control interface (port num_ifs) after all matched ports. When num_ifs == DPSW_MAX_IF and all ports match the flood filter, the loop fills all 64 slots and the control interface write overflows by one entry. The check uses >= because num_ifs == DPSW_MAX_IF is also functionally broken. build_if_id_bitmap() silently drops any ID >= 64: if (id[i] < DPSW_MAX_IF) bmap[id[i] / 64] |= ...
02KernelScan AI Analysis
Risk summary
DPAA2 switch hardware with malicious firmware can cause kernel memory corruption during driver initialization. This affects systems with DPAA2 Ethernet switching hardware where an attacker with privileged local access (or supply-chain control of firmware) can manipulate the firmware attributes reported to the kernel. The vulnerability can lead to kernel crashes or potential code execution.
Vulnerability analysis
The dpaa2-switch driver trusts firmware-provided num_ifs values without validation against DPSW_MAX_IF (64). In dpaa2_switch_fdb_get_flood_cfg(), this value controls array writes to a fixed-size cfg->if_id[DPSW_MAX_IF] array, allowing out-of-bounds writes when num_ifs >= 64. The fix adds a bounds check in dpaa2_switch_init() to reject invalid configurations. The attack surface requires an attacker to be able to influence the DPAA2 Management Complex firmware seen by the driver during probe, which typically requires root-level access to modify firmware images or boot configuration on the host.
03Fix Versions
| Branch | Fixed in | Patch commit |
|---|---|---|
| 5.15 | 5.15.202 | a26dda3bae46 |
| 6.1 | 6.1.165 | a3034a8d5617 |
| 6.12 | 6.12.75 | 8b841fd529db |
| 6.18 | 6.18.16 | 89764cf44544 |
| 6.19 | 6.19.6 | c18493f75020 |
| 6.6 | 6.6.128 | b690635d4719 |
| mainline | 7.0 | 8a5752c6dcc0 |