Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EBBA842B75C for ; Wed, 6 May 2026 11:32:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778067143; cv=none; b=pCx9R0218i0pSw9BbEj5K7Rq5p9GJfbemGZS/DEBqIkNNbiDWKEg+nxTyxH/irIrFuaVzPOzY3A/9C+yr5kIpWeWWROgJwA6kgncLGS0iiXsbFDBBdvxI0thRJDiqTJn7ayJc999XxekUVEgXUfJdnOLTwlOde9AJXpplJF5U9A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778067143; c=relaxed/simple; bh=+JauwSqOmkfZS2fPrpvIjja4XFWoafJo3TM34bNMoHE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=PLktqH4KiXs2I0cipw+h6Mf9VaAEyhEBDgBWum3izBVEe81HyPZhsEJJV41SW5XQq0TPwRKaY3PNEESkwt839+jYw1Yh07oy/GzoIbI7oAMjE5BX6hJEzCDKrTFCGoWOUnxBwPSnKMQQSBh18ZR5KN2XP28CpyiWXEGSX9asQvE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=2VXNtdK6; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="2VXNtdK6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 80128C2BCC4; Wed, 6 May 2026 11:32:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1778067142; bh=+JauwSqOmkfZS2fPrpvIjja4XFWoafJo3TM34bNMoHE=; h=From:To:Cc:Subject:Date:Reply-To:From; b=2VXNtdK6ZFEjIWdheGLnjR48v/J8DgslQAuxlS63PwkEiBQRgYqC3OfFAAS0tUU8K 0xzI/DTLKDRyDklIBWngU2SvogjnovRfXDzLWFLPzU+k60yETqI4lbuXi2zhF9W9YG 0pHL25fkyOHKjtud2Qqk7q98HZP2CV2Q4YzwAosg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-43205: dpaa2-switch: validate num_ifs to prevent out-of-bounds write Date: Wed, 6 May 2026 13:28:41 +0200 Message-ID: <2026050647-CVE-2026-43205-3180@gregkh> X-Mailer: git-send-email 2.54.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3809; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=EIZ37i/kCCiG8dLWd6oPnNvte0wXt127X5Yq+0Zt7T4=; b=owGbwMvMwCRo6H6F97bub03G02pJDJm/VTc7zUj6OL3aosDESOwig9Tilw5X/M9/mKvOPImF+ 66YLM/DjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZhIqSzDgtXHMpZ+mMvxOH0f /4GN9ktsdeUMLRgWXPoy7fxzRfPZd9ol17tZr9PN6NscBAA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman 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] |= ... The Linux kernel CVE team has assigned CVE-2026-43205 to this issue. Affected and fixed versions =========================== Issue introduced in 5.13 with commit 539dda3c5d190c5088b5e57944b1b482fcb464de and fixed in 5.15.202 with commit a26dda3bae469c8e4e1b1993ad33dafa32d0fc28 Issue introduced in 5.13 with commit 539dda3c5d190c5088b5e57944b1b482fcb464de and fixed in 6.1.165 with commit a3034a8d56174dd6464c46823438f25797910a8d Issue introduced in 5.13 with commit 539dda3c5d190c5088b5e57944b1b482fcb464de and fixed in 6.6.128 with commit b690635d4719214892855b79ce018d4b1672ac96 Issue introduced in 5.13 with commit 539dda3c5d190c5088b5e57944b1b482fcb464de and fixed in 6.12.75 with commit 8b841fd529db9faf8bc678d429d4bf4e98b10900 Issue introduced in 5.13 with commit 539dda3c5d190c5088b5e57944b1b482fcb464de and fixed in 6.18.16 with commit 89764cf44544e943230f5e03b8c40a90da26537c Issue introduced in 5.13 with commit 539dda3c5d190c5088b5e57944b1b482fcb464de and fixed in 6.19.6 with commit c18493f750208eb4ff1198fc5a02786b8b2d70a6 Issue introduced in 5.13 with commit 539dda3c5d190c5088b5e57944b1b482fcb464de and fixed in 7.0 with commit 8a5752c6dcc085a3bfc78589925182e4e98468c5 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-43205 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/a26dda3bae469c8e4e1b1993ad33dafa32d0fc28 https://git.kernel.org/stable/c/a3034a8d56174dd6464c46823438f25797910a8d https://git.kernel.org/stable/c/b690635d4719214892855b79ce018d4b1672ac96 https://git.kernel.org/stable/c/8b841fd529db9faf8bc678d429d4bf4e98b10900 https://git.kernel.org/stable/c/89764cf44544e943230f5e03b8c40a90da26537c https://git.kernel.org/stable/c/c18493f750208eb4ff1198fc5a02786b8b2d70a6 https://git.kernel.org/stable/c/8a5752c6dcc085a3bfc78589925182e4e98468c5