Re: [PATCH v4 06/13] ACPI: extlog: Validate PCIe error section length before payload access

Jonathan Cameron <[email protected]>
Newsgroups org.kernel.vger.linux-acpi,org.kernel.vger.linux-cxl
Message-ID <20260825000814.33cbd963@jic23-huawei>
On Mon, 24 Aug 2026 10:49:29 -0700
Dave Jiang <[email protected]> wrote:

> extlog_print_pcie() reads pcie_err->validation_bits and device_id and
> copies the 96-byte aer_info buffer without checking that
> gdata->error_data_length is big enough for a struct cper_sec_pcie. The
> cper_estatus_check() call added earlier keeps the read inside the estatus
> block, but a short section still gets stale adjacent bytes treated as PCIe
> error data.
> 
> Reject a section too small to hold the record before touching any field,
> and warn: a truncated section means firmware is emitting malformed records.
> 
> Reported-by: [email protected]
> Closes: https://lore.kernel.org/linux-cxl/[email protected]/
> Fixes: e778ffefa34d ("ACPI: extlog: Trace CPER PCI Express Error Section")
> Reviewed-by: Alison Schofield <[email protected]>
> Reviewed-by: Shuai Xue <[email protected]>
> Assisted-by: Claude:claude-opus-4-8
> Signed-off-by: Dave Jiang <[email protected]>

Reviewed-by: Jonathan Cameron <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.