CVE-2025-40201
kernel/sys.c: fix the racy usage of task_lock(tsk->group_leader) in sys_prlimit64() paths
Description
In the Linux kernel, the following vulnerability has been resolved: kernel/sys.c: fix the racy usage of task_lock(tsk->group_leader) in sys_prlimit64() paths The usage of task_lock(tsk->group_leader) in sys_prlimit64()->do_prlimit() path is very broken. sys_prlimit64() does get_task_struct(tsk) but this only protects task_struct itself. If tsk != current and tsk is not a leader, this process can exit/exec and task_lock(tsk->group_leader) may use the already freed task_struct. Another problem is that sys_prlimit64() can race with mt-exec which changes ->group_leader. In this case do_prlimit() may take the wrong lock, or (worse) ->group_leader may change between task_lock() and task_unlock(). Change sys_prlimit64() to take tasklist_lock when necessary. This is not nice, but I don't see a better fix for -stable.
INFO
Published Date :
Nov. 12, 2025, 10:15 p.m.
Last Modified :
Oct. 19, 2026, 9:10 p.m.
Remotely Exploit :
No
Source :
416baaa9-dc9f-4396-8d5f-8c081fb06d67
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS | 134c704f-9b21-4f2e-91b3-4a467353bcc0 | |||||
| CVSS 3.1 | HIGH | 416baaa9-dc9f-4396-8d5f-8c081fb06d67 |
Solution
- Apply the kernel patch for sys_prlimit64.
- Ensure tasklist_lock is used correctly.
- Avoid racy usage of task_lock(tsk->group_leader).
- Update the Linux kernel to the latest stable version.
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-40201.
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-40201 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-40201
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-40201 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2025-40201 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: kernel/sys.c: corregir el uso propenso a condiciones de carrera de task_lock(tsk->group_leader) en las rutas de sys_prlimit64() El uso de task_lock(tsk->group_leader) en la ruta sys_prlimit64()->do_prlimit() está muy defectuoso. sys_prlimit64() realiza get_task_struct(tsk) pero esto solo protege la propia task_struct. Si tsk != current y tsk no es un líder, este proceso puede salir/ejecutar y task_lock(tsk->group_leader) puede usar la task_struct ya liberada. Otro problema es que sys_prlimit64() puede entrar en condición de carrera con mt-exec, que cambia ->group_leader. En este caso, do_prlimit() puede tomar el bloqueo incorrecto, o (peor aún) ->group_leader puede cambiar entre task_lock() y task_unlock(). Modificar sys_prlimit64() para tomar tasklist_lock cuando sea necesario. Esto no es ideal, pero no veo una mejor solución para -stable. -
CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Oct. 15, 2026
Action Type Old Value New Value Added Reference https://git.kernel.org/stable/c/132f827e7bac7373e1522e89709d70b43cae5342 Added Reference https://git.kernel.org/stable/c/19b45c84bd9fd42fa97ff80c6350d604cb871c75 Added Reference https://git.kernel.org/stable/c/1bc0d9315ef5296abb2c9fd840336255850ded18 Added Reference https://git.kernel.org/stable/c/6796412decd2d8de8ec708213bbc958fab72f143 Added Reference https://git.kernel.org/stable/c/a15f37a40145c986cdf289a4b88390f35efdecc4 Removed Reference https://git.kernel.org/stable/c/132f827e7bac7373e1522e89709d70b43cae5342 Removed Reference https://git.kernel.org/stable/c/19b45c84bd9fd42fa97ff80c6350d604cb871c75 Removed Reference https://git.kernel.org/stable/c/1bc0d9315ef5296abb2c9fd840336255850ded18 Removed Reference https://git.kernel.org/stable/c/6796412decd2d8de8ec708213bbc958fab72f143 Removed Reference https://git.kernel.org/stable/c/a15f37a40145c986cdf289a4b88390f35efdecc4 -
CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0
Oct. 15, 2026
Action Type Old Value New Value Added SSVC {'id': 'CVE-2025-40201', 'role': 'CISA Coordinator', 'options': [{'exploitation': 'none'}, {'automatable': 'no'}, {'technicalImpact': 'total'}], 'version': '2.0.3', 'timestamp': '2026-10-15T21:58:02.275858Z'} -
CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Jul. 30, 2026
Action Type Old Value New Value Added CVSS V3.1 AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H -
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': '18c91bb2d87268d23868bf13508f5bc9cf04e89a', 'lessThan': '1bc0d9315ef5296abb2c9fd840336255850ded18', 'versionType': 'git'}, {'status': 'affected', 'version': '18c91bb2d87268d23868bf13508f5bc9cf04e89a', 'lessThan': '132f827e7bac7373e1522e89709d70b43cae5342', 'versionType': 'git'}, {'status': 'affected', 'version': '18c91bb2d87268d23868bf13508f5bc9cf04e89a', 'lessThan': '19b45c84bd9fd42fa97ff80c6350d604cb871c75', 'versionType': 'git'}, {'status': 'affected', 'version': '18c91bb2d87268d23868bf13508f5bc9cf04e89a', 'lessThan': '6796412decd2d8de8ec708213bbc958fab72f143', 'versionType': 'git'}, {'status': 'affected', 'version': '18c91bb2d87268d23868bf13508f5bc9cf04e89a', 'lessThan': 'a15f37a40145c986cdf289a4b88390f35efdecc4', 'versionType': 'git'}], 'programFiles': ['kernel/sys.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.18'}, {'status': 'unaffected', 'version': '0', 'lessThan': '5.18', 'versionType': 'semver'}, {'status': 'unaffected', 'version': '6.1.157', 'versionType': 'semver', 'lessThanOrEqual': '6.1.*'}, {'status': 'unaffected', 'version': '6.6.113', 'versionType': 'semver', 'lessThanOrEqual': '6.6.*'}, {'status': 'unaffected', 'version': '6.12.54', 'versionType': 'semver', 'lessThanOrEqual': '6.12.*'}, {'status': 'unaffected', 'version': '6.17.4', 'versionType': 'semver', 'lessThanOrEqual': '6.17.*'}, {'status': 'unaffected', 'version': '6.18', 'versionType': 'original_commit_for_fix', 'lessThanOrEqual': '*'}], 'programFiles': ['kernel/sys.c'], 'defaultStatus': 'affected'}] -
New CVE Received by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Nov. 12, 2025
Action Type Old Value New Value Added Description In the Linux kernel, the following vulnerability has been resolved: kernel/sys.c: fix the racy usage of task_lock(tsk->group_leader) in sys_prlimit64() paths The usage of task_lock(tsk->group_leader) in sys_prlimit64()->do_prlimit() path is very broken. sys_prlimit64() does get_task_struct(tsk) but this only protects task_struct itself. If tsk != current and tsk is not a leader, this process can exit/exec and task_lock(tsk->group_leader) may use the already freed task_struct. Another problem is that sys_prlimit64() can race with mt-exec which changes ->group_leader. In this case do_prlimit() may take the wrong lock, or (worse) ->group_leader may change between task_lock() and task_unlock(). Change sys_prlimit64() to take tasklist_lock when necessary. This is not nice, but I don't see a better fix for -stable. Added Reference https://git.kernel.org/stable/c/132f827e7bac7373e1522e89709d70b43cae5342 Added Reference https://git.kernel.org/stable/c/19b45c84bd9fd42fa97ff80c6350d604cb871c75 Added Reference https://git.kernel.org/stable/c/1bc0d9315ef5296abb2c9fd840336255850ded18 Added Reference https://git.kernel.org/stable/c/6796412decd2d8de8ec708213bbc958fab72f143 Added Reference https://git.kernel.org/stable/c/a15f37a40145c986cdf289a4b88390f35efdecc4