thunderbolt: Validate XDomain request packet size before type cast
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ cdae7c07e3e3509eaabc18c1640a55dc5b99c179 · < a504b9f2797b739e0304d537e8aa4ce883ecce39| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
thunderbolt: Validate XDomain request packet size before type cast
tb_xdp_handle_request() casts the received packet buffer to protocol-specific structs without verifying that the allocation is large enough for the target type. A peer can send a minimal XDomain packet that passes the generic header length check but is shorter than the struct accessed after the cast, causing out-of- bounds reads from the kmemdup allocation.
Plumb the packet length through xdomain_request_work and validate it against the expected struct size before each cast.
From the CVE record · Linux
The Linux kernel's thunderbolt XDomain request handler does not check that a received packet is large enough before casting it to a protocol-specific structure. A peer can send a short XDomain packet that passes the generic header check and causes an out-of-bounds read.
Engineers running Linux kernels with thunderbolt XDomain support should check whether their kernel includes the fix; affected versions were not specified.