mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-11 17:59:44 +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 {
|
} else {
|
||||||
ubufsz = dataoff - 28;
|
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 */
|
/* check this is an even number of bytes */
|
||||||
if (ubufsz % 2 != 0) {
|
if (ubufsz % 2 != 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user