rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] 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.
@ 2025-07-11 11:33 Quaternions
  2025-07-11 11:33 ` [PATCH] gpu: nova-core: define named constants for magic numbers Quaternions
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Quaternions @ 2025-07-11 11:33 UTC (permalink / raw)
  To: acourbot; +Cc: rust-for-linux, Quaternions

Signed-off-by: Rhys Lloyd <krakow20@gmail.com>
---
 drivers/gpu/nova-core/vbios.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/nova-core/vbios.rs b/drivers/gpu/nova-core/vbios.rs
index 663fc50e8b66..5b5d9f38cbb3 100644
--- a/drivers/gpu/nova-core/vbios.rs
+++ b/drivers/gpu/nova-core/vbios.rs
@@ -901,7 +901,7 @@ struct PmuLookupTableEntry {

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

--
2.50.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-07-14 15:26 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-11 11:33 [PATCH] 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 Quaternions
2025-07-11 11:33 ` [PATCH] gpu: nova-core: define named constants for magic numbers Quaternions
2025-07-11 12:18   ` Alexandre Courbot
2025-07-14 15:26     ` Joel Fernandes
2025-07-11 11:54 ` [PATCH] 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 Greg KH
2025-07-11 12:04 ` Alexandre Courbot
2025-07-11 12:20   ` Alexandre Courbot
2025-07-11 14:32     ` Rhys Lloyd
2025-07-11 14:55       ` Miguel Ojeda
2025-07-11 12:12 ` Miguel Ojeda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).