CVE-2026-138829

platform/x86: hp-bioscfg: fix 16-byte heap overflow for empty auth token

Published Nov 30, 2026 CVSS 3.1 · 4.4 Medium EPSS n/a KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

platform/x86: hp-bioscfg: fix 16-byte heap overflow for empty auth token

hp_calculate_security_buffer() special-cases an empty authentication
string and returns a fixed 4 bytes (sizeof(u16) * 2). But
hp_populate_security_buffer() does not special-case that same input:
for any authentication string that does not start with BEAM_PREFIX,
including the empty string, it always builds "UTF_PREFIX +
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, hp_set_attribute(), sizes its kmalloc() buffer using
hp_calculate_security_buffer()'s return value, so for an empty
authentication token it allocates 4 bytes for the security area but
hp_populate_security_buffer() 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
hp_calculate_security_buffer(). The generic calculation that follows
already accounts for the UTF_PREFIX correctly, which naturally yields
the same 20 bytes that hp_populate_security_buffer() writes for an empty
string, avoiding duplicate logic for special cases.

Analysis

AI-generated

Technical impact

The vulnerability is a 16‑byte heap overflow triggered when the administrative authentication token is empty. In the Linux kernel, hp_calculate_security_buffer() miscomputes the required buffer size for an empty token, while hp_populate_security_buffer() writes 20 bytes regardless of the token length. This imbalance writes beyond the allocated memory and can corrupt adjacent heap objects, potentially leading to memory corruption and subsequent control‑flow hijacking or unauthorized BIOS configuration changes.

Affected Systems

All Linux kernel builds that include the hp_bioscfg module and have not applied the patch are affected. The issue is exercised when the BIOS admin password is left as the default empty string and a writable attribute is modified. No specific kernel version range is provided, so any unpatched kernel containing this code path is vulnerable.

Risk and Exploitability

The exploitability is not quantified in the available metrics; EPSS is not available and the vulnerability is not listed in KEV. The vulnerability requires that an attacker can write to a BIOS attribute without admin authentication, which is typically a local privilege or privileged user scenario. Because it involves kernel memory corruption, successful exploitation could yield high impact, but the exact probability of exploitation in the wild remains uncertain.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to a Linux kernel that incorporates the hp_bioscfg patch correcting the buffer size calculation.
  • If an updated kernel is unavailable, apply the upstream patch from the related git commits to the hp_bioscfg source.
  • Set a non‑empty BIOS admin password to eliminate the empty‑token code path as a temporary mitigation.
  • Monitor for unauthorized BIOS configuration changes and enforce strong authentication for BIOS writes.

Generated by OpenCVE AI on November 30, 2026 at 16:42 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-787
References
Metrics threat_severity

None

cvssV3_1

{'score': 4.4, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Moderate

Type Values Removed Values Added
First Time appeared Linux linux
Vendors & Products Linux linux
Type Values Removed Values Added
Weaknesses CWE-122
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: platform/x86: hp-bioscfg: fix 16-byte heap overflow for empty auth token hp_calculate_security_buffer() special-cases an empty authentication string and returns a fixed 4 bytes (sizeof(u16) * 2). But hp_populate_security_buffer() does not special-case that same input: for any authentication string that does not start with BEAM_PREFIX, including the empty string, it always builds "UTF_PREFIX + 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, hp_set_attribute(), sizes its kmalloc() buffer using hp_calculate_security_buffer()'s return value, so for an empty authentication token it allocates 4 bytes for the security area but hp_populate_security_buffer() 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 hp_calculate_security_buffer(). The generic calculation that follows already accounts for the UTF_PREFIX correctly, which naturally yields the same 20 bytes that hp_populate_security_buffer() writes for an empty string, avoiding duplicate logic for special cases.
Title platform/x86: hp-bioscfg: fix 16-byte heap overflow for empty auth token
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:25 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:17 PM
Modified
Nov 30, 2026, 2:17 PM
Severity
Moderate
Public date
Nov 30, 2026, 1:25 PM