[lvc-project] [PATCH net v3] fsl/fman: Validate cell-index value obtained from Device Tree

Jakub Kicinski kuba at kernel.org
Wed Sep 4 17:23:07 MSK 2024


On Wed, 4 Sep 2024 09:09:20 +0300 Aleksandr Mishin wrote:
> 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.

coccicheck complains of_dev is not released, we should fix that first,
before we add more returns here.
-- 
pw-bot: cr



More information about the lvc-project mailing list