AZL-116824: CVE-2026-139010 affecting package kernel 6.6.161.1-1
In the Linux kernel, the following vulnerability has been resolved:
platform/x86: hp-bioscfg: fix slab-out-of-bounds write in hpconverthexstrtostr()
hpconverthexstrtostr() decodes an ACPI string made up of space-separated ASCII hex-byte tokens of the form "0xHH". For example, the four-byte input "0x41" decodes to the single character 'A', and the nine-byte input "0x09 0x41" decodes to "\tA": each token is read in a five-byte step (four characters for the token, one for the trailing delimiter), and produces one output byte, or two if that byte is '\\', '\r', '\n', or '\t', which are written back out as a backslash followed by the matching letter.
The output buffer is sized with kmalloc(inputlen, GFPKERNEL), the raw encoded length of the input, not the decoded length. For well-formed input this is generous, since five input bytes never decode to more than two output bytes. But inputlen comes directly from the ACPI string length reported by firmware and isn't guaranteed to respect the five-byte encoding, so a short inputlen can undersize the allocation. With inputlen == 1, only one byte is allocated, yet decoding still produces at least one output byte plus the NUL terminator written unconditionally afterwards, so two bytes are needed. That terminator write then lands one byte past the end of the allocation.
KASAN caught exactly this during BIOS attribute enumeration on boot, triggered by a one-byte encoded input value:
BUG: KASAN: slab-out-of-bounds in hpconverthexstrtostr+0x6d8/0x710 [hpbioscfg] Write of size 1 at addr ffff8881032e5d81 by task (udev-worker)/520 The buggy address is located 0 bytes to the right of allocated 1-byte region [ffff8881032e5d80, ffff8881032e5d81)
Size the allocation to the worst-case decoded length instead of the raw input length: two output bytes for every five-byte input chunk (DIVROUNDUP(inputlen, 5)), plus one byte for the terminator.
Affected Software
Event History
Frequently Asked Questions
What input condition leads to the out-of-bounds write?
The issue occurs when hp_convert_hexstr_to_str() receives an ACPI string length that does not match the expected space-separated 0xHH token encoding. A reported input length of 1 can allocate only one byte while decoding still writes an output byte and a terminating NUL byte.
Which data source is involved in triggering the issue?
The affected function processes an ACPI string whose length is reported by firmware. The allocation uses that firmware-reported raw input length rather than a size guaranteed to accommodate the decoded output and terminator.
Why can otherwise valid-looking hex decoding produce an unsafe write?
The decoder can expand certain decoded bytes, including backslash, carriage return, newline, and tab, into two-character escaped sequences. Although well-formed five-byte tokens generally leave sufficient room, malformed or unexpectedly short firmware-reported lengths can undersize the buffer.