net: thunderbolt: Release the Rx HopID that was handed out on mismatch
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 180b0689425c6fb2b35e69a3316ee38371a782df · < 2f1463554d0561a2fead81e3888604e5c1125e29| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net: thunderbolt: Release the Rx HopID that was handed out on mismatch
tb_xdomain_alloc_in_hopid() passes the wanted HopID to ida_alloc_range() as the lower bound, so a taken id is not an error there: the allocator returns the next free one above it. tbnet_connected_work() asks for the peer's transmit path, treats any other id as a failure and returns without releasing what it got, so that allocation stays live for the rest of the XDomain connection with nothing left holding a reference to it.
Release the id when it is not the one we asked for, the same way the error unwind at the end of the function releases the expected one.
From the CVE record · Linux
The Linux kernel’s Thunderbolt networking code can leave an allocated receive HopID unreleased. This happens during an XDomain connection when the requested HopID is taken and the allocator returns another ID, which the connection code treats as a failure.
Engineers running Linux systems that use Thunderbolt networking should check their kernel versions; affected versions are not specified.