thunderbolt: property: Reject u32 wrap in tb_property_entry_valid()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ cdae7c07e3e3509eaabc18c1640a55dc5b99c179 · < 31b98e503ecca8077e5247253dd5425ab84bc96d| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
thunderbolt: property: Reject u32 wrap in tb_property_entry_valid()
entry->value is u32 and entry->length is u16; the sum is performed in u32 and wraps. A malicious XDomain peer can pick value = 0xffffff00, length = 0x100 so the sum 0x100000000 wraps to 0 and passes the > block_len check. tb_property_parse() then passes entry->value to parse_dwdata() as a dword offset into the property block, reading attacker-directed memory far past the allocation.
For TEXT-typed entries with the "deviceid" or "vendorid" keys this lands in xd->device_name / xd->vendor_name and is readable back via the per-XDomain device_name / vendor_name sysfs attributes; the leak is NUL-bounded (kstrdup() stops at the first zero byte) and untargeted (the attacker picks a delta, not an absolute address). DATA-typed entries are parsed into property->value.data but not generically surfaced to userspace.
Use check_add_overflow() so a wrapped sum is rejected.
From the CVE record · Linux
A u32 overflow in Thunderbolt property validation lets a malicious XDomain peer supply a property entry that passes a bounds check and causes an out-of-bounds read. For certain TEXT entries, the peer can read back a NUL-bounded, untargeted memory leak through the XDomain device_name or vendor_name sysfs attributes.
Engineers running Linux kernels with Thunderbolt XDomain support should check their kernel version; affected versions were not specified.