From 702cec8635e94785633e6efa01a218189b764ef5 Mon Sep 17 00:00:00 2001 From: Patrick Rudolph Date: Sun, 1 Feb 2026 14:04:33 +0100 Subject: [PATCH] drivers/i2c/at24rf08c/lenovo_serials: Fix out of bounds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ensure that the mainboard version string is fully contained within one 128byte block of the EEPROM. Since it's read from offset 0x27 it can be 89 characters long. One byte for the final null terminator. Change-Id: I264ea2d1f634bb3493858da9f066bd6cef1ca960 Signed-off-by: Patrick Rudolph Reviewed-on: https://review.coreboot.org/c/coreboot/+/91041 Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki Reviewed-by: Paul Menzel --- src/drivers/i2c/at24rf08c/lenovo_serials.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/drivers/i2c/at24rf08c/lenovo_serials.c b/src/drivers/i2c/at24rf08c/lenovo_serials.c index dd09dda7fe..8b355062e5 100644 --- a/src/drivers/i2c/at24rf08c/lenovo_serials.c +++ b/src/drivers/i2c/at24rf08c/lenovo_serials.c @@ -154,7 +154,7 @@ void smbios_system_set_uuid(u8 *uuid) const char *smbios_mainboard_version(void) { - static char result[100]; + static char result[90]; static int already_read; struct device *dev; int len;