CVE-2026-139673: drm/amdgpu/atom: bound the VBIOS date, part number, version and build getters
In the Linux kernel, the following vulnerability has been resolved:
drm/amdgpu/atom: bound the VBIOS date, part number, version and build getters
atomgetvbiosdate(), atomgetvbiospn(), atomgetvbiosversion() and atomgetvbiosbuild() all walk the BIOS image using offsets and counts taken from the image itself, checked only against each other and never against ctx->biossize:
- atomgetvbiosdate() reads 14 bytes at a fixed offset that checkatombios()'s minimum size (0x49) does not cover. - atomgetvbiospn() dereferences an image-supplied u16 string offset unchecked, then walks and copies from it with only a length cap, not an image cap. - atomgetvbiosversion() takes its search bounds from image u16s; atomfindstrinrom() already clamps the search itself, but the match is then advanced by a fixed 18 bytes and STRLENNORMAL bytes are copied from there with no check that this still lands inside the image. - atomgetvbiosbuild() walks from an image-supplied config-string offset toward the ROM header; a config offset at or past the header makes the pointer difference negative, wrapping through the u16 'len' and passing strscpy() a bound far larger than the 32-byte destination.
Bound each getter's reads, walks and copies to ctx->biossize, falling back to an empty string on a malformed image.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In drm/amdgpu/atom, bound atom_get_vbios_date(), atom_get_vbios_pn(), atom_get_vbios_version(), and atom_get_vbios_build() reads, walks, and copies to ctx->bios_size; return an empty string for malformed images.
Event History
Frequently Asked Questions
Which firmware-parsing operations need review?
The affected operations are the getters for VBIOS date, part number, version, and build information. Each uses offsets, lengths, or bounds supplied by the BIOS image without consistently validating them against the BIOS image size.
Does the existing ROM string-search bound prevent every unsafe access?
No. Although atom_find_str_in_rom() clamps its search, the version getter advances a match by 18 bytes and copies STRLEN_NORMAL bytes without verifying that the resulting range remains inside the image.
What malformed BIOS fields are relevant when investigating exposure?
Relevant conditions include an unchecked part-number string offset, version-search bounds taken from image u16 values, and a build config-string offset at or beyond the ROM header. The latter can produce a negative pointer difference that wraps through a u16 length and gives strscpy() an excessively large bound.