CVE-2026-142839: platform/x86: hp-wmi: fix heap OOB read and memory corruption in hp_wmi_perform_query()
In the Linux kernel, the following vulnerability has been resolved:
platform/x86: hp-wmi: fix heap OOB read and memory corruption in hpwmiperformquery()
hpwmiperformquery() evaluates an ACPI WMI method and expects a struct biosreturn header in the returned buffer. However, it only checks that the ACPI object type is ACPITYPEBUFFER without verifying that obj->buffer.length is at least sizeof(biosreturn) (8 bytes).
If the firmware or ACPI method returns a buffer shorter than 8 bytes:
1. biosreturn->returncode at offset 4 reads out of bounds from the allocated ACPI buffer slab.
2. If returncode evaluates to 0 and outsize is non-zero, (int)(obj->buffer.length - sizeof(biosreturn)) evaluates to a negative integer (e.g. -8 for a 0-length buffer). actualoutsize is set to this negative value and passed to memcpy(buffer, ..., actualoutsize), where the signed negative value is cast to sizet (e.g. 0xfffffffffffffff8), attempting to copy ~18 Exabytes and triggering an immediate kernel crash. Additionally, memset(buffer + actualoutsize, ...) performs an out-of-bounds write before buffer.
Fix this by ensuring obj->buffer.length is at least sizeof(biosreturn) before accessing the return code, and compute actualoutsize safely using mint(u32, ...), which is sound specifically because the guard above already rules out obj->buffer.length being smaller than sizeof(biosreturn) by the time that subtraction runs.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.10.275 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.15.226 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.1.193 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.6.163 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.117 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.63 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.4 - Compensating control
In Linux kernel hp_wmi_perform_query(), verify obj->buffer.length is at least sizeof(*bios_return) (8 bytes) before reading bios_return->return_code, then compute actual_outsize safely using min_t(u32, ...).
Event History
Frequently Asked Questions
Which systems are exposed to this issue?
Systems running the Linux kernel hp-wmi driver are affected when hp_wmi_perform_query() evaluates an ACPI WMI method and processes its returned buffer.
What condition is required to trigger the fault?
The ACPI WMI method must return an object of type ACPI buffer whose length is less than the 8-byte bios_return header expected by the driver. A short response can cause an out-of-bounds read and, under the described return-code and output-size conditions, memory corruption or an immediate kernel crash.