Re: [PATCH] ACPI: PRMT: validate module handler bounds
From: Pengpeng Hou
Date: Wed Dec 02 2026 - 22:21:15 EST
Hi Rafael,
I agree that checking only for a short record is insufficient.
acpi_parse_prmt() allocates storage from handler_info_count, while
the first input handler is located by handler_info_offset. Those
are separate descriptions of the input; a large module length alone
doesn't establish that the offset and all the handlers are valid.
I'd validate the offset and count against the enclosing module and
table before entering the handler loop, including the zero-handler
case. I'd distinguish invalid additional handlers from trailing bytes
allowed by a newer record revision rather than require an exact size
without a specification basis.
Thanks,
Pengpeng