[PATCH] dmicheck: fix the length check error for type 9

Sunny Wang Sunny.Wang at arm.com
Tue Mar 7 14:41:20 UTC 2023


Looks good to me. Thanks much, Ivan!

Reviewed-by: Sunny Wang <sunny.wang at arm.com>

Cc Edhaya and Samer for their visibility.

Best Regards,
Sunny

-----Original Message-----
From: fwts-devel <fwts-devel-bounces at lists.ubuntu.com> On Behalf Of Ivan Hu
Sent: 07 March 2023 07:38
To: fwts-devel at lists.ubuntu.com
Subject: [PATCH] dmicheck: fix the length check error for type 9

BugLink: https://bugs.launchpad.net/fwts/+bug/2007989

Signed-off-by: Ivan Hu <ivan.hu at canonical.com>
---
 src/dmi/dmicheck/dmicheck.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/dmi/dmicheck/dmicheck.c b/src/dmi/dmicheck/dmicheck.c
index 10c87b32..9717d802 100644
--- a/src/dmi/dmicheck/dmicheck.c
+++ b/src/dmi/dmicheck/dmicheck.c
@@ -1502,7 +1502,7 @@ static void dmicheck_entry(fwts_framework *fw,
                                                data[0x10], table, addr, "Device/Function Number", 0x10);
                        }

-                       if (hdr->length < (0x17 + 5 * data[0x12]))
+                       if (hdr->length < (0x18 + 5 * data[0x12]))
                                break;

                        dmi_min_max_uint8_check(fw, table, addr, "Slot Height", hdr, (0x17 + 5 * data[0x12]), 0, 0x6);
--
2.25.1


--
fwts-devel mailing list
fwts-devel at lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/fwts-devel
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.


More information about the fwts-devel mailing list