mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-11 10:27:13 +00:00
acpi-phat: Prevent a corrupt PHAT table from allocating ~4GB of memory
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=35761
This commit is contained in:
parent
24eec8c533
commit
a5de6f0248
@ -88,6 +88,14 @@ fu_acpi_phat_health_record_parse (FuFirmware *firmware,
|
||||
} else {
|
||||
ubufsz = dataoff - 28;
|
||||
}
|
||||
if (ubufsz > bufsz) {
|
||||
g_set_error (error,
|
||||
G_IO_ERROR,
|
||||
G_IO_ERROR_INVALID_DATA,
|
||||
"device path too large: 0x%x",
|
||||
(guint) ubufsz);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* check this is an even number of bytes */
|
||||
if (ubufsz % 2 != 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user