CVE-2026-138880: PCI/sysfs: Pass the device name length in UTF-16 code units
In the Linux kernel, the following vulnerability has been resolved:
PCI/sysfs: Pass the device name length in UTF-16 code units
Currently, dsmlabelutf16stoutf8s() passes the ACPI buffer length to utf16stoutf8s() unchanged. The Device Name DSM may return the device name as a buffer holding a UTF-16 string, and the ACPI length counts bytes while the converter counts wchart elements. The converter therefore receives a count twice the number of code units the buffer holds, and that count is its only bound on the input.
A NUL code unit ends the conversion early, so a name that carries one is converted correctly and the error stays hidden. ACPICA zeroes the entire result allocation, and the padding placed after the buffer supplies that NUL for most lengths. Lengths that leave no padding, or a single byte of it, do not, and the conversion then runs up to its own length in bytes past the end of the allocation. The bytes beyond the allocation are decoded into the "label" attribute, which is world readable.
Divide the buffer length by the size of wchart so that the converter receives a count of code units. The division truncates, so the converter is never told to read more bytes than the buffer holds, including for an odd length.
Reaching the out of bounds read needs firmware that returns the name as a buffer and omits the terminator.
Affected Software
Event History
Frequently Asked Questions
What conditions are required to expose data through this issue?
A PCI device must provide a Device Name _DSM result containing a UTF-16 buffer whose length leaves no zeroed padding after the allocation, or only one byte of padding. The conversion also must not encounter a NUL UTF-16 code unit within the supplied buffer before reaching its end.
What information can be exposed?
The UTF-16-to-UTF-8 conversion can read past the end of the ACPI-provided allocation. Bytes beyond that allocation may be decoded into the PCI device's "label" sysfs attribute, which is world readable.
How can I check whether a system may already be affected?
Inspect PCI device label sysfs attributes and determine whether affected devices return Device Name _DSM values without an in-buffer UTF-16 NUL terminator and with a buffer length that has insufficient post-allocation padding. The issue is visible when out-of-bounds bytes appear as part of a device label.
What is the corrective change?
The UTF-16 buffer length passed to the converter must be divided by sizeof(wchar_t), so the converter receives a count in UTF-16 code units rather than bytes. This prevents it from being instructed to read beyond the supplied buffer.