thunderbolt: Make the DP tunnel activation callback mandatory
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
6.18.617.2.107.3In the Linux kernel, the following vulnerability has been resolved:
thunderbolt: Make the DP tunnel activation callback mandatory
tb_tunnel_alloc_dp() takes an optional callback which is run from dprx_work once the DPRX capabilities read has completed. Without that callback tb_dp_dprx_start() reads the capabilities synchronously and never queues the work. It however always takes a tunnel reference which is only dropped by dprx_work itself or by tb_dp_dprx_stop() when cancel_delayed_work() actually canceled that work. That reference is thus leaked for every tunnel without a callback.
The only tunnels without one are those from tb_tunnel_discover_dp(), which are activated again when restoring from hibernation. Pass the callback to tb_tunnel_discover_dp() as well and drop the synchronous path such that the DPRX capabilities are always read from dprx_work. Hibernation restore then also no longer blocks for up to 12 seconds while waiting for that read to complete.
Also fix up the KUnit tests.
From the CVE record · Linux
The Linux kernel leaks a tunnel reference when a discovered Thunderbolt DP tunnel is activated without a callback during hibernation restore. Hibernation restore can also block for up to 12 seconds while DPRX capabilities are read. The input does not describe an attacker, access requirements, or user interaction.
Engineers running Linux kernels with Thunderbolt DP tunnel support should check their versions; affected versions are not specified.