HIGH Introduced in 6.6
hp-bioscfg StringBuffer Overflow
CVE-2026-81012
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
KernelScan AI7.0HIGH
01Description
In the Linux kernel, the following vulnerability has been resolved: platform/x86: hp-bioscfg: fix off-by-one write in hp_get_string_from_buffer() hp_get_string_from_buffer() clamps the converted string length against the destination buffer size with "size > dst_size", so when the converted length is exactly equal to dst_size, conv_dst_size is left at dst_size and the unconditional NUL terminator write dst[conv_dst_size] = 0; lands one byte past the destination buffer. This is the same shape of bug as the previously fixed off-by-one in hp_convert_hexstr_to_str(): the buffer is sized correctly for the content, but the terminator write is never checked against that size. Fix by changing the comparison to ">=" so conv_dst_size is always left with room for the terminator. All fixed-size destinations that reach this function (path[512], current_value[512], current_password/current_value[64], and the per-entry buffers in encodings[][512] and prerequisites[][512]) are affected.
02KernelScan AI Analysis
Risk summary
A one-byte stack buffer overflow exists in the HP BIOS Configuration driver, triggered when firmware data produces a string whose converted length exactly matches a fixed-size destination buffer. Any local user on an affected HP notebook can reach the vulnerable path by reading sysfs attributes, though exploitation requires a specific string length from firmware. The overflow corrupts kernel stack memory and may lead to privilege escalation or a system crash.
Vulnerability analysis
The HP BIOS Configuration driver copies strings from firmware data into fixed-size buffers, but it fails to leave room for the string terminator when the content exactly fills the buffer. This causes a one-byte write past the end of a kernel stack buffer. The corrected code always reserves space for the terminator. The flaw is reached when a local user reads the firmware-attributes exposed by the driver through sysfs, which triggers parsing of BIOS configuration data; the overflow only occurs when a string in that data has a precise length matching the buffer size. The driver is only present on HP commercial notebooks.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 6.12 | 6.6 | 6.12.109 | 3cc772d01547 |
| 6.18 | 6.6 | 6.18.50 | b15b334fbc3c |
| 6.6 | 6.6 | 6.6.157 | 8f5aa1506cdd |
| mainline | 6.6 | 7.3-rc1 | dc03f05e419f |
| 7.2 | 6.6 | 7.2.4 | ddf98cf33529 |
| cip/6.12 | 6.6 | 6.12.111-cip32 | 3cc772d01547 |