gpu: nova-core: fix bounds check in PmuLookupTableEntry::new
authorRhys Lloyd <krakow20@gmail.com>
Sun, 13 Jul 2025 02:51:08 +0000 (19:51 -0700)
committerAlexandre Courbot <acourbot@nvidia.com>
Thu, 17 Jul 2025 05:10:58 +0000 (14:10 +0900)
commit14ae91a81ec8fa0bc23170d4aa16dd2a20d54105
tree687057a2f131d1870bb3237a66fdeee9cf8a4c90
parent215a3f91713383a3c0d2da82d223a608a3c17ac1
gpu: nova-core: fix bounds check in PmuLookupTableEntry::new

data is sliced from 2..6, but the bounds check data.len() < 5
does not satisfy those bounds.

Fixes: 47c4846e4319 ("gpu: nova-core: vbios: Add support for FWSEC ucode extraction")
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Reviewed-by: Joel Fernandes <joelagnelf@nvidia.com>
Signed-off-by: Rhys Lloyd <krakow20@gmail.com>
Link: https://lore.kernel.org/r/20250713025108.9364-2-krakow20@gmail.com
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
drivers/gpu/nova-core/vbios.rs