Linux Kernel up to 6.17.2 thunderbolt cancel_delayed_work use after free

| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 7.6 | $0-$5k | 0.00 |
Summary
A vulnerability was found in Linux Kernel up to 6.17.2 and classified as critical. This affects the function cancel_delayed_work of the component thunderbolt. Such manipulation leads to use after free.
This vulnerability is listed as CVE-2025-40002. There is no available exploit.
It is suggested to upgrade the affected component.
Details
A vulnerability was found in Linux Kernel up to 6.17.2 and classified as critical. Affected by this issue is the function cancel_delayed_work of the component thunderbolt. The manipulation with an unknown input leads to a use after free vulnerability. Using CWE to declare the problem leads to CWE-416. Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code. Impacted is confidentiality, integrity, and availability. CVE summarizes:
In the Linux kernel, the following vulnerability has been resolved: thunderbolt: Fix use-after-free in tb_dp_dprx_work The original code relies on cancel_delayed_work() in tb_dp_dprx_stop(), which does not ensure that the delayed work item tunnel->dprx_work has fully completed if it was already running. This leads to use-after-free scenarios where tb_tunnel is deallocated by tb_tunnel_put(), while tunnel->dprx_work remains active and attempts to dereference tb_tunnel in tb_dp_dprx_work(). A typical race condition is illustrated below: CPU 0 | CPU 1 tb_dp_tunnel_active() | tb_deactivate_and_free_tunnel()| tb_dp_dprx_start() tb_tunnel_deactivate() | queue_delayed_work() tb_dp_activate() | tb_dp_dprx_stop() | tb_dp_dprx_work() //delayed worker cancel_delayed_work() | tb_tunnel_put(tunnel); | | tunnel = container_of(...); //UAF | tunnel-> //UAF Replacing cancel_delayed_work() with cancel_delayed_work_sync() is not feasible as it would introduce a deadlock: both tb_dp_dprx_work() and the cleanup path acquire tb->lock, and cancel_delayed_work_sync() would wait indefinitely for the work item that cannot proceed. Instead, implement proper reference counting: - If cancel_delayed_work() returns true (work is pending), we release the reference in the stop function. - If it returns false (work is executing or already completed), the reference is released in delayed work function itself. This ensures the tb_tunnel remains valid during work item execution while preventing memory leaks. This bug was found by static analysis.
The advisory is available at git.kernel.org. This vulnerability is handled as CVE-2025-40002 since 04/16/2025. The exploitation is known to be easy. Technical details are known, but there is no available exploit. The structure of the vulnerability defines a possible price range of USD $0-$5k at the moment (estimation calculated on 02/13/2026).
The vulnerability scanner Nessus provides a plugin with the ID 271678 (Linux Distros Unpatched Vulnerability : CVE-2025-40002), which helps to determine the existence of the flaw in a target environment.
Upgrading to version 6.17.3 or 6.18-rc1 eliminates this vulnerability. Applying the patch c07923f6a8729fc27ee652221a51702ff6654097/67600ccfc4f38ebd331b9332ac94717bfbc87ea7 is able to eliminate this problem. The bugfix is ready for download at git.kernel.org. The best possible mitigation is suggested to be upgrading to the latest version.
The vulnerability is also documented in the databases at Tenable (271678), EUVD (EUVD-2025-34987) and CERT Bund (WID-SEC-2025-2340). If you want to get best quality of vulnerability data, you may have to visit VulDB.
Affected
- Debian Linux
- Amazon Linux 2
- Ubuntu Linux
- SUSE Linux
- Oracle Linux
- SUSE openSUSE
- Open Source Linux Kernel
Product
Type
Vendor
Name
Version
License
Website
- Vendor: https://www.kernel.org/
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔒VulDB Reliability: 🔍
CVSSv3
VulDB Meta Base Score: 8.0VulDB Meta Temp Score: 7.6
VulDB Base Score: 8.0
VulDB Temp Score: 7.6
VulDB Vector: 🔒
VulDB Reliability: 🔍
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍
Exploiting
Class: Use after freeCWE: CWE-416 / CWE-119
CAPEC: 🔒
ATT&CK: 🔒
Physical: No
Local: No
Remote: Partially
Availability: 🔒
Status: Not defined
EPSS Score: 🔒
EPSS Percentile: 🔒
Price Prediction: 🔍
Current Price Estimation: 🔒
| 0-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
Nessus ID: 271678
Nessus Name: Linux Distros Unpatched Vulnerability : CVE-2025-40002
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: UpgradeStatus: 🔍
0-Day Time: 🔒
Upgrade: Kernel 6.17.3/6.18-rc1
Patch: c07923f6a8729fc27ee652221a51702ff6654097/67600ccfc4f38ebd331b9332ac94717bfbc87ea7
Timeline
04/16/2025 CVE reserved10/18/2025 Advisory disclosed
10/18/2025 VulDB entry created
02/13/2026 VulDB entry last update
Sources
Vendor: kernel.orgAdvisory: git.kernel.org
Status: Confirmed
CVE: CVE-2025-40002 (🔒)
GCVE (CVE): GCVE-0-2025-40002
GCVE (VulDB): GCVE-100-329018
EUVD: 🔒
CERT Bund: WID-SEC-2025-2340 - Linux Kernel: Mehrere Schwachstellen ermöglichen Denial of Service
Entry
Created: 10/18/2025 15:00Updated: 02/13/2026 02:26
Changes: 10/18/2025 15:00 (59), 10/18/2025 17:33 (1), 10/20/2025 19:02 (7), 10/27/2025 19:46 (2), 12/22/2025 04:02 (1), 02/13/2026 02:26 (1)
Complete: 🔍
Cache ID: 216::103
If you want to get best quality of vulnerability data, you may have to visit VulDB.
No comments yet. Languages: en.
Please log in to comment.