# CVE-2026-43205: dpaa2-switch: validate num_ifs to prevent out-of-bounds write

- Severity: High 7.8 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.14%, higher than 3% of CVEs (2026-12-01)
- Published: 2026-05-06T11:28:10.270Z
- Modified: 2026-11-11T20:10:00.273Z
- Weaknesses: CWE-787
- Assigned by: Linux

## Description

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] |= ...

(As written by CVE List.)

## Affected

- Linux Linux: from 539dda3c5d190c5088b5e57944b1b482fcb464de before a26dda3bae469c8e4e1b1993ad33dafa32d0fc28; from 539dda3c5d190c5088b5e57944b1b482fcb464de before a3034a8d56174dd6464c46823438f25797910a8d; from 539dda3c5d190c5088b5e57944b1b482fcb464de before b690635d4719214892855b79ce018d4b1672ac96; from 539dda3c5d190c5088b5e57944b1b482fcb464de before 8b841fd529db9faf8bc678d429d4bf4e98b10900; from 539dda3c5d190c5088b5e57944b1b482fcb464de before 89764cf44544e943230f5e03b8c40a90da26537c; from 539dda3c5d190c5088b5e57944b1b482fcb464de before c18493f750208eb4ff1198fc5a02786b8b2d70a6; from 539dda3c5d190c5088b5e57944b1b482fcb464de before 8a5752c6dcc085a3bfc78589925182e4e98468c5; 5.13 (not affected: before 5.13; from 5.15.202 up to 5.15.*; from 6.1.165 up to 6.1.*; from 6.6.128 up to 6.6.*; from 6.12.75 up to 6.12.*; from 6.18.16 up to 6.18.*; from 6.19.6 up to 6.19.*; from 7.0 up to *)
- linux linux_kernel: from 5.13 before 5.15.202; from 5.16 before 6.1.165; from 6.2 before 6.6.128; from 6.7 before 6.12.75; from 6.13 before 6.18.16; from 6.19 before 6.19.6; 7.0

## References

- <https://git.kernel.org/stable/c/a26dda3bae469c8e4e1b1993ad33dafa32d0fc28> (patch)
- <https://git.kernel.org/stable/c/a3034a8d56174dd6464c46823438f25797910a8d> (patch)
- <https://git.kernel.org/stable/c/b690635d4719214892855b79ce018d4b1672ac96> (patch)
- <https://git.kernel.org/stable/c/8b841fd529db9faf8bc678d429d4bf4e98b10900> (patch)
- <https://git.kernel.org/stable/c/89764cf44544e943230f5e03b8c40a90da26537c> (patch)
- <https://git.kernel.org/stable/c/c18493f750208eb4ff1198fc5a02786b8b2d70a6> (patch)
- <https://git.kernel.org/stable/c/8a5752c6dcc085a3bfc78589925182e4e98468c5> (patch)

## Sources

- CVE List: [CVE-2026-43205](https://www.cve.org/CVERecord?id=CVE-2026-43205), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2026-43205](https://nvd.nist.gov/vuln/detail/CVE-2026-43205), Public domain, modified 2026-11-11

---

Page: https://cve.day/CVE-2026-43205 · Whole record: https://cve.day/CVE-2026-43205.json · Rebuilt by cve.day 2026-11-25T22:59:20.728Z
