diff options
| author | Michael Bommarito <michael.bommarito@gmail.com> | 2026-05-25 05:28:28 -0400 |
|---|---|---|
| committer | Mika Westerberg <mika.westerberg@linux.intel.com> | 2026-05-26 15:18:29 +0200 |
| commit | a504b9f2797b739e0304d537e8aa4ce883ecce39 (patch) | |
| tree | e01e9a0ce6259805c4ce04a6c4b54da077de2caa /include/uapi/linux/patchkey.h | |
| parent | 322e93448d908434ae5545660fcbe8f5a7a8e141 (diff) | |
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.
Fixes: 8e1de7042596 ("thunderbolt: Add support for XDomain lane bonding")
Fixes: cdae7c07e3e3 ("thunderbolt: Add support for XDomain properties")
Cc: stable@vger.kernel.org
Assisted-by: Claude:claude-opus-4-7
Signed-off-by: Michael Bommarito <michael.bommarito@gmail.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'include/uapi/linux/patchkey.h')
0 files changed, 0 insertions, 0 deletions
