]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ntb: ntb_hw_switchtec: Fix array-index-out-of-bounds access
authorMaciej Grochowski <Maciej.Grochowski@sony.com>
Thu, 13 Feb 2025 22:53:18 +0000 (14:53 -0800)
committerJon Mason <jdmason@kudzu.us>
Fri, 20 Feb 2026 22:31:55 +0000 (17:31 -0500)
commitc8ba7ad2cc1c7b90570aa347b8ebbe279f1eface
tree2baaf5b41173a8eaf1f1db05e8bb7aaefbfc1d50
parent186615f8855a0be4ee7d3fcd09a8ecc10e783b08
ntb: ntb_hw_switchtec: Fix array-index-out-of-bounds access

Number of MW LUTs depends on NTB configuration and can be set to MAX_MWS,
This patch protects against invalid index out of bounds access to mw_sizes
When invalid access print message to user that configuration is not valid.

Signed-off-by: Maciej Grochowski <Maciej.Grochowski@sony.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
drivers/ntb/hw/mscc/ntb_hw_switchtec.c