Skip to content

Commit 14ae91a

Browse files
krakow10Gnurou
authored andcommitted
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: 47c4846 ("gpu: nova-core: vbios: Add support for FWSEC ucode extraction") Reviewed-by: Alexandre Courbot <[email protected]> Reviewed-by: Joel Fernandes <[email protected]> Signed-off-by: Rhys Lloyd <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Courbot <[email protected]>
1 parent 215a3f9 commit 14ae91a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/nova-core/vbios.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,7 @@ struct PmuLookupTableEntry {
901901

902902
impl PmuLookupTableEntry {
903903
fn new(data: &[u8]) -> Result<Self> {
904-
if data.len() < 5 {
904+
if data.len() < 6 {
905905
return Err(EINVAL);
906906
}
907907

0 commit comments

Comments
 (0)