In the Linux kernel, the following vulnerability has been resolved: kernel/sys.c: fix the racy usage of task_lock(tsk->group_leader) in… (CVE-2025-40201)
A race condition vulnerability in the Linux kernel's sys_prlimit64() function involving improper locking of task group leaders has been resolved. The issue arises from unsafe usage of task_lock(tsk->group_leader), which can lead to accessing freed task_struct objects or taking incorrect locks due to concurrent changes in group_leader. This can cause serious kernel-level integrity and availability issues.
AI Analysis
Technical Summary
CVE-2025-40201 addresses a race condition in the Linux kernel's sys_prlimit64() syscall implementation. The vulnerability stems from the improper locking of task_lock(tsk->group_leader) in the do_prlimit() path. The function sys_prlimit64() obtains a reference to a task_struct but does not adequately protect against the task exiting or executing, which can lead to use-after-free of the task_struct when locking the group leader. Additionally, concurrent modifications to the group_leader pointer (e.g., via mt-exec) can cause the wrong lock to be acquired or inconsistencies between lock and unlock operations. The fix involves taking the tasklist_lock when necessary to prevent these race conditions, ensuring proper synchronization.
Potential Impact
Exploitation of this race condition can lead to use-after-free scenarios and incorrect locking in kernel space, potentially resulting in privilege escalation, data corruption, or denial of service (kernel crash). The CVSS v3.1 vector indicates local attack complexity with low privileges required and no user interaction, with high impact on confidentiality, integrity, and availability.
Mitigation Recommendations
A fix has been implemented in the Linux kernel by modifying sys_prlimit64() to take the tasklist_lock when necessary to prevent race conditions. Users and administrators should apply the official kernel updates that include this fix. Since this is a kernel-level vulnerability, updating to the patched kernel version is the recommended mitigation. Patch status is not explicitly confirmed in the provided data; check the vendor or Linux kernel stable release notes for the exact fixed versions and apply updates accordingly.
In the Linux kernel, the following vulnerability has been resolved: kernel/sys.c: fix the racy usage of task_lock(tsk->group_leader) in… (CVE-2025-40201)
Description
A race condition vulnerability in the Linux kernel's sys_prlimit64() function involving improper locking of task group leaders has been resolved. The issue arises from unsafe usage of task_lock(tsk->group_leader), which can lead to accessing freed task_struct objects or taking incorrect locks due to concurrent changes in group_leader. This can cause serious kernel-level integrity and availability issues.
CVSS v3.1
Score 7.8high
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2025-40201 addresses a race condition in the Linux kernel's sys_prlimit64() syscall implementation. The vulnerability stems from the improper locking of task_lock(tsk->group_leader) in the do_prlimit() path. The function sys_prlimit64() obtains a reference to a task_struct but does not adequately protect against the task exiting or executing, which can lead to use-after-free of the task_struct when locking the group leader. Additionally, concurrent modifications to the group_leader pointer (e.g., via mt-exec) can cause the wrong lock to be acquired or inconsistencies between lock and unlock operations. The fix involves taking the tasklist_lock when necessary to prevent these race conditions, ensuring proper synchronization.
Potential Impact
Exploitation of this race condition can lead to use-after-free scenarios and incorrect locking in kernel space, potentially resulting in privilege escalation, data corruption, or denial of service (kernel crash). The CVSS v3.1 vector indicates local attack complexity with low privileges required and no user interaction, with high impact on confidentiality, integrity, and availability.
Mitigation Recommendations
A fix has been implemented in the Linux kernel by modifying sys_prlimit64() to take the tasklist_lock when necessary to prevent race conditions. Users and administrators should apply the official kernel updates that include this fix. Since this is a kernel-level vulnerability, updating to the patched kernel version is the recommended mitigation. Patch status is not explicitly confirmed in the provided data; check the vendor or Linux kernel stable release notes for the exact fixed versions and apply updates accordingly.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-r7m4-wpp2-9f3x
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2025-40201"]
- Database Specific Severity
- HIGH
- Cvss Version
- 3.1
Threat ID: 6a6b72d59c2644c7f8479f6c
Added to database: 07/30/2026, 15:50:45 UTC
Last enriched: 07/30/2026, 17:22:36 UTC
Last updated: 09/10/2026, 19:38:44 UTC
Views: 12
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.