platform/x86: hp-wmi: fix heap OOB read and memory corruption in hp_wmi_perform_query()
Summary
| CVE | CVE-2026-142839 |
| State | PUBLISHED |
| Assigner | Linux |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-12-03 04:18:20 UTC |
| Updated | 2026-12-03 04:18:20 UTC |
| Description | In the Linux kernel, the following vulnerability has been resolved:
platform/x86: hp-wmi: fix heap OOB read and memory corruption in hp_wmi_perform_query()
hp_wmi_perform_query() evaluates an ACPI WMI method and expects a
struct bios_return header in the returned buffer. However, it only
checks that the ACPI object type is ACPI_TYPE_BUFFER without verifying
that obj->buffer.length is at least sizeof(*bios_return) (8 bytes).
If the firmware or ACPI method returns a buffer shorter than 8 bytes:
1. bios_return->return_code at offset 4 reads out of bounds from the
allocated ACPI buffer slab.
2. If return_code evaluates to 0 and outsize is non-zero,
(int)(obj->buffer.length - sizeof(*bios_return)) evaluates to a
negative integer (e.g. -8 for a 0-length buffer). actual_outsize is
set to this negative value and passed to memcpy(buffer, ...,
actual_outsize), where the signed negative value is cast to
size_t (e.g. 0xfffffffffffffff8), attempting to copy ~18 Exabytes
and triggering an immediate kernel crash. Additionally,
memset(buffer + actual_outsize, ...) performs an out-of-bounds
write before buffer.
Fix this by ensuring obj->buffer.length is at least sizeof(*bios_return)
before accessing the return code, and compute actual_outsize safely
using min_t(u32, ...), which is sound specifically because the guard
above already rules out obj->buffer.length being smaller than
sizeof(*bios_return) by the time that subtraction runs. |
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|
| CNA |
Linux |
Linux |
affected c3021ea1beeeb1aa8a92fa6946a6e25fc55f171d a61a396669a052b6484057cc7425aa65d3fe7f24 git |
Not specified |
| CNA |
Linux |
Linux |
affected c3021ea1beeeb1aa8a92fa6946a6e25fc55f171d 2331fbac2db151ca69d475d8f2bbdee121249a13 git |
Not specified |
| CNA |
Linux |
Linux |
affected c3021ea1beeeb1aa8a92fa6946a6e25fc55f171d 14954f322392d37c864188f095f1707f5c9a8e5d git |
Not specified |
| CNA |
Linux |
Linux |
affected c3021ea1beeeb1aa8a92fa6946a6e25fc55f171d de1c1e4194f08b5f63df004e7172ea797b02a8df git |
Not specified |
| CNA |
Linux |
Linux |
affected c3021ea1beeeb1aa8a92fa6946a6e25fc55f171d 56b4fa4d435e1ec52257692289cef9bff1bc79ce git |
Not specified |
| CNA |
Linux |
Linux |
affected c3021ea1beeeb1aa8a92fa6946a6e25fc55f171d d904db0a4d32bd49cff2476bf11cf0715c444804 git |
Not specified |
| CNA |
Linux |
Linux |
affected c3021ea1beeeb1aa8a92fa6946a6e25fc55f171d d2f87a7eb3de026deb7ddc859758a0ca27cc88ed git |
Not specified |
| CNA |
Linux |
Linux |
affected c3021ea1beeeb1aa8a92fa6946a6e25fc55f171d 6dea092b261f04d632411c2be52d13190f5f67b1 git |
Not specified |
| CNA |
Linux |
Linux |
affected 2.6.39 |
Not specified |
| CNA |
Linux |
Linux |
unaffected 2.6.39 semver |
Not specified |
| CNA |
Linux |
Linux |
unaffected 5.10.275 5.10.* semver |
Not specified |
| CNA |
Linux |
Linux |
unaffected 5.15.226 5.15.* semver |
Not specified |
| CNA |
Linux |
Linux |
unaffected 6.1.193 6.1.* semver |
Not specified |
| CNA |
Linux |
Linux |
unaffected 6.6.163 6.6.* semver |
Not specified |
| CNA |
Linux |
Linux |
unaffected 6.12.117 6.12.* semver |
Not specified |
| CNA |
Linux |
Linux |
unaffected 6.18.63 6.18.* semver |
Not specified |
| CNA |
Linux |
Linux |
unaffected 7.3.4 7.3.* semver |
Not specified |
| CNA |
Linux |
Linux |
unaffected 7.4-rc1 * original_commit_for_fix |
Not specified |
References
| Reference | Source | Link | Tags |
|---|
| git.kernel.org/stable/c/de1c1e4194f08b5f63df004e7172ea797b02a8df |
416baaa9-dc9f-4396-8d5f-8c081fb06d67 |
git.kernel.org |
|
| git.kernel.org/stable/c/14954f322392d37c864188f095f1707f5c9a8e5d |
416baaa9-dc9f-4396-8d5f-8c081fb06d67 |
git.kernel.org |
|
| git.kernel.org/stable/c/6dea092b261f04d632411c2be52d13190f5f67b1 |
416baaa9-dc9f-4396-8d5f-8c081fb06d67 |
git.kernel.org |
|
| git.kernel.org/stable/c/a61a396669a052b6484057cc7425aa65d3fe7f24 |
416baaa9-dc9f-4396-8d5f-8c081fb06d67 |
git.kernel.org |
|
| git.kernel.org/stable/c/56b4fa4d435e1ec52257692289cef9bff1bc79ce |
416baaa9-dc9f-4396-8d5f-8c081fb06d67 |
git.kernel.org |
|
| git.kernel.org/stable/c/2331fbac2db151ca69d475d8f2bbdee121249a13 |
416baaa9-dc9f-4396-8d5f-8c081fb06d67 |
git.kernel.org |
|
| git.kernel.org/stable/c/d2f87a7eb3de026deb7ddc859758a0ca27cc88ed |
416baaa9-dc9f-4396-8d5f-8c081fb06d67 |
git.kernel.org |
|
| git.kernel.org/stable/c/d904db0a4d32bd49cff2476bf11cf0715c444804 |
416baaa9-dc9f-4396-8d5f-8c081fb06d67 |
git.kernel.org |
|
| CVE Program record |
CVE.ORG |
www.cve.org |
canonical |
| NVD vulnerability detail |
NVD |
nvd.nist.gov |
canonical, analysis |
No vendor comments have been submitted for this CVE.
There are currently no legacy QID mappings associated with this CVE.