Import Source
https://github.com/microsoft/AzureLinuxVulnerabilityData/blob/main/osv/AZL-71380.json
JSON Data
https://api.test.osv.dev/v1/vulns/AZL-71380
Upstream
Published
2025-12-04T16:16:19Z
Modified
2026-04-01T05:22:02.972579Z
Summary
CVE-2025-40258 affecting package kernel for versions less than 6.6.119.3-1
Details

In the Linux kernel, the following vulnerability has been resolved:

mptcp: fix race condition in mptcpschedulework()

syzbot reported use-after-free in mptcpschedulework() [1]

Issue here is that mptcpschedulework() schedules a work, then gets a refcount on sk->skrefcnt if the work was scheduled. This refcount will be released by mptcpworker().

[A] if (schedulework(...)) { [B] sockhold(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] refcountt: addition on 0; use-after-free. WARNING: CPU: 1 PID: 29 at lib/refcount.c:25 refcountwarn_saturate+0xfa/0x1d0 lib/refcount.c:25 Call Trace: <TASK> __refcount_add include/linux/refcount.h:-1 [inline] __refcountinc include/linux/refcount.h:366 [inline] refcountinc include/linux/refcount.h:383 [inline] sockhold include/net/sock.h:816 [inline] mptcpschedulework+0x164/0x1a0 net/mptcp/protocol.c:943 mptcptouttimer+0x21/0xa0 net/mptcp/protocol.c:2316 calltimerfn+0x17e/0x5f0 kernel/time/timer.c:1747 expiretimers kernel/time/timer.c:1798 [inline] __run_timers kernel/time/timer.c:2372 [inline] __runtimerbase+0x648/0x970 kernel/time/timer.c:2384 runtimerbase kernel/time/timer.c:2393 [inline] run_timersoftirq+0xb7/0x180 kernel/time/timer.c:2403 handlesoftirqs+0x22f/0x710 kernel/softirq.c:622 __dosoftirq kernel/softirq.c:656 [inline] runktimerd+0xcf/0x190 kernel/softirq.c:1138 smpbootthreadfn+0x542/0xa60 kernel/smpboot.c:160 kthread+0x711/0x8a0 kernel/kthread.c:463 retfromfork+0x4bc/0x870 arch/x86/kernel/process.c:158 retfromforkasm+0x1a/0x30 arch/x86/entry/entry64.S:245

References

Affected packages

Azure Linux:3 / kernel

Package

Name
kernel
Purl
pkg:rpm/azure-linux/kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
6.6.119.3-1

Database specific

source
"https://github.com/microsoft/AzureLinuxVulnerabilityData/blob/main/osv/AZL-71380.json"