CVE-2026-138829: platform/x86: hp-bioscfg: fix 16-byte heap overflow for empty auth token
In the Linux kernel, the following vulnerability has been resolved:
platform/x86: hp-bioscfg: fix 16-byte heap overflow for empty auth token
hpcalculatesecuritybuffer() special-cases an empty authentication string and returns a fixed 4 bytes (sizeof(u16) 2). But hppopulatesecuritybuffer() does not special-case that same input: for any authentication string that does not start with BEAMPREFIX, including the empty string, it always builds "UTFPREFIX + authentication" and converts the result to UTF-16, writing a 2-byte length header plus 2 bytes per character of "<utf-16/>" (9 characters), 20 bytes total, regardless of how long "authentication" itself is.
The caller, hpsetattribute(), sizes its kmalloc() buffer using hpcalculatesecuritybuffer()'s return value, so for an empty authentication token it allocates 4 bytes for the security area but hppopulatesecuritybuffer() then writes 20 bytes into it, causing a 16-byte heap buffer overflow.
The authentication token used here is the current admin/setup password, which is an empty string by default until one is configured. Any write to a writable BIOS attribute while no admin password has been set reaches this path.
Fix by removing the special-case early return for an empty string in hpcalculatesecuritybuffer(). The generic calculation that follows already accounts for the UTFPREFIX correctly, which naturally yields the same 20 bytes that hppopulatesecuritybuffer() writes for an empty string, avoiding duplicate logic for special cases.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- 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 the Linux kernel’s platform/x86 hp-bioscfg code, remove the empty-string special-case early return from hp_calculate_security_buffer().
Event History
Frequently Asked Questions
Which systems are exposed to this issue?
Systems using the Linux kernel hp-bioscfg driver are exposed when a writable BIOS attribute is changed while the HP admin/setup password is unset. The empty password is the default state until an admin password is configured.
What action triggers the overflow?
Writing to a writable BIOS attribute causes the driver to process the current admin/setup password as an authentication token. When that token is empty, the driver allocates 4 bytes but writes 20 bytes, overflowing the heap buffer by 16 bytes.
What can be done if the kernel fix cannot be applied immediately?
Avoid writes to writable BIOS attributes through hp-bioscfg while no admin/setup password is configured. Configuring a non-empty admin/setup password avoids the empty-token condition described.