Description
In the Linux kernel, the following vulnerability has been resolved:
PCI/sysfs: Pass the device name length in UTF-16 code units
Currently, dsm_label_utf16s_to_utf8s() passes the ACPI buffer length to
utf16s_to_utf8s() 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 wchar_t 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 wchar_t 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.
PCI/sysfs: Pass the device name length in UTF-16 code units
Currently, dsm_label_utf16s_to_utf8s() passes the ACPI buffer length to
utf16s_to_utf8s() 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 wchar_t 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 wchar_t 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.
Published:
2026-11-30
Score:
n/a
EPSS:
n/a
KEV:
No
Analysis and contextual insights are available on OpenCVE Cloud.
Remediation
No vendor fix or workaround currently provided.
Additional remediation guidance may be available on OpenCVE Cloud.
Tracking
Sign in to view the affected projects.
Advisories
No advisories yet.
References
History
Mon, 30 Nov 2026 13:30:00 +0000
| Type | Values Removed | Values Added |
|---|---|---|
| Description | In the Linux kernel, the following vulnerability has been resolved: PCI/sysfs: Pass the device name length in UTF-16 code units Currently, dsm_label_utf16s_to_utf8s() passes the ACPI buffer length to utf16s_to_utf8s() 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 wchar_t 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 wchar_t 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. | |
| Title | PCI/sysfs: Pass the device name length in UTF-16 code units | |
| First Time appeared |
Linux
Linux linux Kernel |
|
| CPEs | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | |
| Vendors & Products |
Linux
Linux linux Kernel |
|
| References |
|
|
Status: PUBLISHED
Assigner: Linux
Published:
Updated: 2026-11-30T13:25:50.986Z
Reserved: 2026-11-30T13:22:15.900Z
Link: CVE-2026-138880
No data.
Status : Received
Published: 2026-11-30T14:17:45.243
Modified: 2026-11-30T14:17:45.243
Link: CVE-2026-138880
No data.
OpenCVE Enrichment
No data.
Weaknesses
No weakness.