CVE-2025-40258
mptcp: fix race condition in mptcp_schedule_work()
Description
In the Linux kernel, the following vulnerability has been resolved: mptcp: fix race condition in mptcp_schedule_work() syzbot reported use-after-free in mptcp_schedule_work() [1] Issue here is that mptcp_schedule_work() schedules a work, then gets a refcount on sk->sk_refcnt if the work was scheduled. This refcount will be released by mptcp_worker(). [A] if (schedule_work(...)) { [B] sock_hold(sk); return true; } Problem is that mptcp_worker() can run immediately and complete before [B] We need instead : sock_hold(sk); if (schedule_work(...)) return true; sock_put(sk); [1] refcount_t: addition on 0; use-after-free. WARNING: CPU: 1 PID: 29 at lib/refcount.c:25 refcount_warn_saturate+0xfa/0x1d0 lib/refcount.c:25 Call Trace: <TASK> __refcount_add include/linux/refcount.h:-1 [inline] __refcount_inc include/linux/refcount.h:366 [inline] refcount_inc include/linux/refcount.h:383 [inline] sock_hold include/net/sock.h:816 [inline] mptcp_schedule_work+0x164/0x1a0 net/mptcp/protocol.c:943 mptcp_tout_timer+0x21/0xa0 net/mptcp/protocol.c:2316 call_timer_fn+0x17e/0x5f0 kernel/time/timer.c:1747 expire_timers kernel/time/timer.c:1798 [inline] __run_timers kernel/time/timer.c:2372 [inline] __run_timer_base+0x648/0x970 kernel/time/timer.c:2384 run_timer_base kernel/time/timer.c:2393 [inline] run_timer_softirq+0xb7/0x180 kernel/time/timer.c:2403 handle_softirqs+0x22f/0x710 kernel/softirq.c:622 __do_softirq kernel/softirq.c:656 [inline] run_ktimerd+0xcf/0x190 kernel/softirq.c:1138 smpboot_thread_fn+0x542/0xa60 kernel/smpboot.c:160 kthread+0x711/0x8a0 kernel/kthread.c:463 ret_from_fork+0x4bc/0x870 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
INFO
Published Date :
Dec. 4, 2025, 4:16 p.m.
Last Modified :
Oct. 19, 2026, 9:10 p.m.
Remotely Exploit :
Yes !
Source :
416baaa9-dc9f-4396-8d5f-8c081fb06d67
Affected Products
The following products are affected by CVE-2025-40258
vulnerability.
Even if cvefeed.io is aware of the exact versions of the
products
that
are
affected, the information is not represented in the table below.
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS | 134c704f-9b21-4f2e-91b3-4a467353bcc0 | |||||
| CVSS 3.1 | CRITICAL | 416baaa9-dc9f-4396-8d5f-8c081fb06d67 |
Solution
- Hold socket reference before scheduling work.
- Schedule work, returning if successful.
- Release socket reference if work not scheduled.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2025-40258.
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2025-40258 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2025-40258
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2025-40258 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2025-40258 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
CVE Translated by [email protected]
Oct. 19, 2026
Action Type Old Value New Value Added Translation Title: Linux, Description: En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: mptcp: soluciona condición de carrera en mptcp_schedule_work() syzbot informó uso después de liberación en mptcp_schedule_work() [1] El problema aquí es que mptcp_schedule_work() programa una tarea, luego obtiene un contador de referencias en sk->sk_refcnt si la tarea fue programada. Este contador de referencias será liberado por mptcp_worker(). [A] if (schedule_work(...)) { [B] sock_hold(sk); return true; } El problema es que mptcp_worker() puede ejecutarse inmediatamente y completarse antes de [B] En su lugar, necesitamos: sock_hold(sk); if (schedule_work(...)) return true; sock_put(sk); [1] refcount_t: adición en 0; uso después de liberación. WARNING: CPU: 1 PID: 29 at lib/refcount.c:25 refcount_warn_saturate+0xfa/0x1d0 lib/refcount.c:25 Traza de Llamada: <TASK> __refcount_add include/linux/refcount.h:-1 [inline] __refcount_inc include/linux/refcount.h:366 [inline] refcount_inc include/linux/refcount.h:383 [inline] sock_hold include/net/sock.h:816 [inline] mptcp_schedule_work+0x164/0x1a0 net/mptcp/protocol.c:943 mptcp_tout_timer+0x21/0xa0 net/mptcp/protocol.c:2316 call_timer_fn+0x17e/0x5f0 kernel/time/timer.c:1747 expire_timers kernel/time/timer.c:1798 [inline] __run_timers kernel/time/timer.c:2372 [inline] __run_timer_base+0x648/0x970 kernel/time/timer.c:2384 run_timer_base kernel/time/timer.c:2393 [inline] run_timer_softirq+0xb7/0x180 kernel/time/timer.c:2403 handle_softirqs+0x22f/0x710 kernel/softirq.c:622 __do_softirq kernel/softirq.c:656 [inline] run_ktimerd+0xcf/0x190 kernel/softirq.c:1138 smpboot_thread_fn+0x542/0xa60 kernel/smpboot.c:160 kthread+0x711/0x8a0 kernel/kthread.c:463 ret_from_fork+0x4bc/0x870 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 -
CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Jul. 30, 2026
Action Type Old Value New Value Added CVSS V3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H -
CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0
Jun. 17, 2026
Action Type Old Value New Value Added SSVC {'id': 'CVE-2025-40258', 'role': 'CISA Coordinator', 'options': [{'exploitation': 'none'}, {'automatable': 'no'}, {'technicalImpact': 'partial'}], 'version': '2.0.3', 'timestamp': '2026-06-16T19:42:15.474459Z'} -
CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Jun. 17, 2026
Action Type Old Value New Value Added Affected [{'repo': 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git', 'vendor': 'Linux', 'product': 'Linux', 'versions': [{'status': 'affected', 'version': '3b1d6210a9577369103330b0d802b0bf74b65e7f', 'lessThan': 'f865e6595acf33083168db76921e66ace8bf0e5b', 'versionType': 'git'}, {'status': 'affected', 'version': '3b1d6210a9577369103330b0d802b0bf74b65e7f', 'lessThan': '99908e2d601236842d705d5fd04fb349577316f5', 'versionType': 'git'}, {'status': 'affected', 'version': '3b1d6210a9577369103330b0d802b0bf74b65e7f', 'lessThan': 'db4f7968a75250ca6c4ed70d0a78beabb2dcee18', 'versionType': 'git'}, {'status': 'affected', 'version': '3b1d6210a9577369103330b0d802b0bf74b65e7f', 'lessThan': '8f9ba1a99a89feef9b5867c15a0141a97e893309', 'versionType': 'git'}, {'status': 'affected', 'version': '3b1d6210a9577369103330b0d802b0bf74b65e7f', 'lessThan': 'ac28dfddedf6f209190950fc71bcff65ec4ab47b', 'versionType': 'git'}, {'status': 'affected', 'version': '3b1d6210a9577369103330b0d802b0bf74b65e7f', 'lessThan': '3fc7723ed01d1130d4bf7063c50e0af60ecccbb4', 'versionType': 'git'}, {'status': 'affected', 'version': '3b1d6210a9577369103330b0d802b0bf74b65e7f', 'lessThan': '035bca3f017ee9dea3a5a756e77a6f7138cc6eea', 'versionType': 'git'}], 'programFiles': ['net/mptcp/protocol.c'], 'defaultStatus': 'unaffected'}, {'repo': 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git', 'vendor': 'Linux', 'product': 'Linux', 'versions': [{'status': 'affected', 'version': '5.7'}, {'status': 'unaffected', 'version': '0', 'lessThan': '5.7', 'versionType': 'semver'}, {'status': 'unaffected', 'version': '5.10.247', 'versionType': 'semver', 'lessThanOrEqual': '5.10.*'}, {'status': 'unaffected', 'version': '5.15.197', 'versionType': 'semver', 'lessThanOrEqual': '5.15.*'}, {'status': 'unaffected', 'version': '6.1.159', 'versionType': 'semver', 'lessThanOrEqual': '6.1.*'}, {'status': 'unaffected', 'version': '6.6.118', 'versionType': 'semver', 'lessThanOrEqual': '6.6.*'}, {'status': 'unaffected', 'version': '6.12.60', 'versionType': 'semver', 'lessThanOrEqual': '6.12.*'}, {'status': 'unaffected', 'version': '6.17.10', 'versionType': 'semver', 'lessThanOrEqual': '6.17.*'}, {'status': 'unaffected', 'version': '6.18', 'versionType': 'original_commit_for_fix', 'lessThanOrEqual': '*'}], 'programFiles': ['net/mptcp/protocol.c'], 'defaultStatus': 'affected'}] -
CVE Modified by 0b142b55-0307-4c5a-b3c9-f314f3fb7c5e
Jun. 17, 2026
Action Type Old Value New Value Added Affected [{'vendor': 'Siemens', 'product': 'RUGGEDCOM RST2428P', 'versions': [{'status': 'affected', 'version': '0', 'lessThan': 'V4.0', 'versionType': 'custom'}], 'defaultStatus': 'unknown'}] -
CVE Modified by 0b142b55-0307-4c5a-b3c9-f314f3fb7c5e
Jun. 02, 2026
Action Type Old Value New Value Added Reference https://cert-portal.siemens.com/productcert/html/ssa-253495.html -
CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Dec. 06, 2025
Action Type Old Value New Value Added Reference https://git.kernel.org/stable/c/99908e2d601236842d705d5fd04fb349577316f5 Added Reference https://git.kernel.org/stable/c/db4f7968a75250ca6c4ed70d0a78beabb2dcee18 Added Reference https://git.kernel.org/stable/c/f865e6595acf33083168db76921e66ace8bf0e5b -
New CVE Received by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Dec. 04, 2025
Action Type Old Value New Value Added Description In the Linux kernel, the following vulnerability has been resolved: mptcp: fix race condition in mptcp_schedule_work() syzbot reported use-after-free in mptcp_schedule_work() [1] Issue here is that mptcp_schedule_work() schedules a work, then gets a refcount on sk->sk_refcnt if the work was scheduled. This refcount will be released by mptcp_worker(). [A] if (schedule_work(...)) { [B] sock_hold(sk); return true; } Problem is that mptcp_worker() can run immediately and complete before [B] We need instead : sock_hold(sk); if (schedule_work(...)) return true; sock_put(sk); [1] refcount_t: addition on 0; use-after-free. WARNING: CPU: 1 PID: 29 at lib/refcount.c:25 refcount_warn_saturate+0xfa/0x1d0 lib/refcount.c:25 Call Trace: <TASK> __refcount_add include/linux/refcount.h:-1 [inline] __refcount_inc include/linux/refcount.h:366 [inline] refcount_inc include/linux/refcount.h:383 [inline] sock_hold include/net/sock.h:816 [inline] mptcp_schedule_work+0x164/0x1a0 net/mptcp/protocol.c:943 mptcp_tout_timer+0x21/0xa0 net/mptcp/protocol.c:2316 call_timer_fn+0x17e/0x5f0 kernel/time/timer.c:1747 expire_timers kernel/time/timer.c:1798 [inline] __run_timers kernel/time/timer.c:2372 [inline] __run_timer_base+0x648/0x970 kernel/time/timer.c:2384 run_timer_base kernel/time/timer.c:2393 [inline] run_timer_softirq+0xb7/0x180 kernel/time/timer.c:2403 handle_softirqs+0x22f/0x710 kernel/softirq.c:622 __do_softirq kernel/softirq.c:656 [inline] run_ktimerd+0xcf/0x190 kernel/softirq.c:1138 smpboot_thread_fn+0x542/0xa60 kernel/smpboot.c:160 kthread+0x711/0x8a0 kernel/kthread.c:463 ret_from_fork+0x4bc/0x870 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Added Reference https://git.kernel.org/stable/c/035bca3f017ee9dea3a5a756e77a6f7138cc6eea Added Reference https://git.kernel.org/stable/c/3fc7723ed01d1130d4bf7063c50e0af60ecccbb4 Added Reference https://git.kernel.org/stable/c/8f9ba1a99a89feef9b5867c15a0141a97e893309 Added Reference https://git.kernel.org/stable/c/ac28dfddedf6f209190950fc71bcff65ec4ab47b