CVE-2026-43141: ntb: ntb_hw_switchtec: Fix shift-out-of-bounds for 0 mw lut
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
ntb: ntb_hw_switchtec: Fix shift-out-of-bounds for 0 mw lut
Number of MW LUTs depends on NTB configuration and can be set to zero, in such scenario rounddown_pow_of_two will cause undefined behaviour and should not be performed.
This patch ensures that rounddown_pow_of_two is called on valid value.
The Linux kernel CVE team has assigned CVE-2026-43141 to this issue.
Affected and fixed versions
===========================
Fixed in 5.10.252 with commit d652ef399f131fcd5f8f34266167449ee7c9e5b3 Fixed in 5.15.202 with commit 5590cd04d6845c01a6bad985a491c58af6fb5389 Fixed in 6.1.165 with commit a11d03d116eef138a7249202bd772c8e61915aec Fixed in 6.6.128 with commit d0559d07afabfddaaded6a61a16154486b956764 Fixed in 6.12.75 with commit 2e4d5e8d86a969318340be95470bb76e52392082 Fixed in 6.18.16 with commit a133e3caf844a3f56b6eef89ddaa66115874f6bd Fixed in 6.19.6 with commit 1a867d0d79a4a570a33f2f433919ad2bd7a27b67 Fixed in 7.0 with commit 186615f8855a0be4ee7d3fcd09a8ecc10e783b08
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-43141
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/ntb/hw/mscc/ntb_hw_switchtec.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/d652ef399f131fcd5f8f34266167449ee7c9e5b3 https://git.kernel.org/stable/c/5590cd04d6845c01a6bad985a491c58af6fb5389 https://git.kernel.org/stable/c/a11d03d116eef138a7249202bd772c8e61915aec https://git.kernel.org/stable/c/d0559d07afabfddaaded6a61a16154486b956764 https://git.kernel.org/stable/c/2e4d5e8d86a969318340be95470bb76e52392082 https://git.kernel.org/stable/c/a133e3caf844a3f56b6eef89ddaa66115874f6bd https://git.kernel.org/stable/c/1a867d0d79a4a570a33f2f433919ad2bd7a27b67 https://git.kernel.org/stable/c/186615f8855a0be4ee7d3fcd09a8ecc10e783b08