RE: [PATCH] ACPI: APEI: EINJ: Validate length of the Vendor Error Type Extension structure

From: Luck, Tony

Date: Thu Nov 12 2026 - 19:48:19 EST


> The BIOS on my machine is obviously buggy (non-zero Vendor Extension offset
> pointing to zeroed memory, and bit 31 is not set in the error type either)
> and needs fixing. I'm not sure if it is necessary to add such a sanity
> check for EINJ at all.

Production machine? Or just an internal development machine? I.e. is this broken
BIOS out in the wild for others to hit this bug?

>
>
> + if (v.length < sizeof(v) || v.length > PAGE_SIZE) {
> + pr_warn(FW_BUG "Invalid vendor error extension length %u\n",

The "FW_BUG" tag was created specifically to point blame at BIOS and thus
encourage OEMs to fix their BIOS. So correct use of it here :-)

> + v.length);
> + acpi_os_unmap_iomem(p, sizeof(v));
> + return;
> + }

The fix looks reasonable. If this has been seen on a production system, then
seems a good idea to apply your patch.

Reviewed-by: Tony Luck <tony.luck@xxxxxxxxx>

-Tony