CVE-2026-81014: platform/x86: hp-bioscfg: fix heap OOB read in sk_store() and kek_store()
In the Linux kernel, the following vulnerability has been resolved:
platform/x86: hp-bioscfg: fix heap OOB read in skstore() and kekstore()
skstore() and kekstore() strip a trailing newline from the sysfs write before allocating the key buffer:
length = count; if (buf[length - 1] == '\n') length--; bioscfgdrv.spmdata.signingkey = kmemdup(buf, length, GFPKERNEL);
but then pass the original "count" (not "length") as the copy size to hpwmiperformquery(), which memcpy()s that many bytes out of the "length"-sized allocation, reading one byte past it whenever the write ends in a newline, the normal case for a shell "echo" into sysfs.
KASAN confirms this directly:
BUG: KASAN: slab-out-of-bounds in hpwmiperformquery+0x1e9/0x460 [hpbioscfg] Read of size 28 at addr ffff88813c8e2b80 by task python3/16022 ... skstore+0xa7/0x240 [hpbioscfg] kernfsfopwriteiter+0x3e1/0x5d0 ... The buggy address is located 0 bytes inside of allocated 27-byte region [ffff88813c8e2b80, ffff88813c8e2b9b)
Reproduced identically for kekstore, and at multiple write sizes (28, 57, 201 bytes), each time reading exactly one byte past a kmemdup() allocation one byte smaller than the write.
Fix by passing "length" instead of "count" to hpwmiperformquery() in both functions.
Affected Software
Event History
Frequently Asked Questions
Which systems are exposed to this issue?
Systems running the Linux kernel with the hp_bioscfg driver and using its sk_store() or kek_store() sysfs write paths are exposed. The affected operations handle signing-key or KEK data through the driver.
What is required to trigger the out-of-bounds read?
An attacker or local process must be able to write to the relevant hp_bioscfg sysfs attributes. A write ending in a newline triggers the condition, including the normal behavior of using echo to write to sysfs.
Is the out-of-bounds read limited to a specific input size?
No. The issue was reproduced with 28-, 57-, and 201-byte writes, and each affected newline-terminated write reads exactly one byte past the allocated buffer.
What can be done before applying the fix?
Avoid writing newline-terminated data to the affected sk_store() and kek_store() sysfs interfaces, and restrict write access to those interfaces to trusted administrators or processes.