Commit bd50c412 authored by Aleksandr Mishin's avatar Aleksandr Mishin Committed by Jakub Kicinski
Browse files

fsl/fman: Validate cell-index value obtained from Device Tree



Cell-index value is obtained from Device Tree and then used to calculate
the index for accessing arrays port_mfl[], mac_mfl[] and intr_mng[].
In case of broken DT due to any error cell-index can contain any value
and it is possible to go beyond the array boundaries which can lead
at least to memory corruption.

Validate cell-index value obtained from Device Tree.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Reviewed-by: default avatarSean Anderson <sean.anderson@seco.com>
Signed-off-by: default avatarAleksandr Mishin <amishin@t-argos.ru>
Link: https://patch.msgid.link/20241028065824.15452-1-amishin@t-argos.ru


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent d86c7a91
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment