summaryrefslogtreecommitdiff
path: root/include/linux/errqueue.h
diff options
context:
space:
mode:
authorDave Jiang <dave.jiang@intel.com>2026-09-04 10:23:36 -0700
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2026-09-04 20:22:06 +0200
commit9c3ad3bfff20d2d7a0c9614db2a58e78123bf0ce (patch)
treea4831083244eac471997694d2e54220078c6e53b /include/linux/errqueue.h
parent10338c9085b4939a428a8dc78d2bbf62c161278b (diff)
ACPI: APEI: GHES: Bound AER info copy and sanitize software metadata
ghes_handle_aer() copies sizeof(struct aer_capability_regs) out of the fixed 96-byte pcie_err->aer_info. The struct is larger, so the copy reads past the section, and it fills the software-only header_len and flit fields of the embedded struct pcie_tlp_log from firmware bytes. pcie_print_tlp_log() uses both to bound a loop over dw[], so a large value walks past the array. Nothing checks the section can hold a struct cper_sec_pcie either. Validate error_data_length, zero the destination, and map aer_info onto the struct as extlog_print_pcie() does: copy up to the four Header Log DWORDs, then place the TLP Prefix Log from its own offset. The rest stays zero, covering header_len and flit. Reported-by: sashiko-bot@kernel.org Closes: https://sashiko.dev/#/patchset/20260714231835.303081-1-dave.jiang@intel.com?part=3 Fixes: 7e077e6707b3 ("PCI/ERR: Handle TLP Log in Flit mode") Reviewed-by: Alison Schofield <alison.schofield@intel.com> Reviewed-by: Shuai Xue <xueshuai@linux.alibaba.com> Reviewed-by: Hanjun Guo <guohanjun@huawei.com> Signed-off-by: Dave Jiang <dave.jiang@intel.com> Link: https://patch.msgid.link/20260904172337.1409775-13-dave.jiang@intel.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux/errqueue.h')
0 files changed, 0 insertions, 0 deletions