LiveActive security incident?Get immediate response
CVE Record

CVE-2025-40201: kernel/sys.c: fix the racy usage of task_lock(tsk->group_leader) in sys_prlimit64() paths

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.

HighCVSS 7.8Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

A Linux kernel race can mishandle a process-leader reference while changing resource limits, potentially accessing freed memory. A local, low-privileged attacker may be able to compromise confidentiality, integrity, or availability. Exposure depends on the exact kernel branch and vendor backports.

Executive priority

Prioritize remediation for shared, multi-user, development, hosting, and other systems running untrusted local code. Treat as a high-priority kernel update, while recognizing that supplied evidence does not show remote or active exploitation.

Technical view

sys_prlimit64() protected a task_struct but not necessarily its group_leader. Concurrent process exit or multi-threaded exec could free or replace that leader while do_prlimit() locks it, causing use-after-free or mismatched locking. The stable fix takes tasklist_lock when necessary.

Likely exposure

Potentially exposed systems run an affected Linux kernel and permit untrusted local users or code execution. The bundle lists affected entries including 5.18, 6.1.157, 6.6.113, 6.12.54, 6.17.4, and 6.18, but does not clearly express complete version ranges.

Exploitation context

The CVSS vector indicates local access, low complexity, low privileges, and no user interaction, with potentially high confidentiality, integrity, and availability impact. The bundle says this CVE is not in KEV and provides no evidence of active exploitation or a public exploit.

Researcher notes

The source describes a concurrency-driven lifetime and locking flaw involving group_leader during prlimit handling. Exact affected ranges are ambiguous in the supplied flattened version data. Validate branch-specific ancestry and distributor backports against the five stable commits; do not infer exposure from version strings alone.

Mitigation direction

  • Update to a supported distribution kernel incorporating the applicable cited stable fix.
  • Confirm the corrected package with your Linux distributor because kernel fixes are commonly backported.
  • Until updated, restrict untrusted local accounts and workloads where operationally feasible.
  • Consult vendor guidance for additional mitigations; the supplied sources name no standalone workaround.

Validation and detection

  • Inventory running kernel versions across hosts, virtual machines, and appliances.
  • Check each distributor's advisory and package changelog for CVE-2025-40201 or a cited fix commit.
  • Verify the corrected kernel is running after installation and reboot.
  • Rescan affected assets and record vendor-specific backport evidence.
Prepared
Confidence
medium
Sources
7

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cve · low confidence lookup

CVE-2025-40201 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
High
CVSS
7.8 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
3Timeline events
0ADP providers
6Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
7.8CVSS 3.1HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H1.85.9Linux

Vulnerability scoring details

Base CVSS 3.1 score

7.8High
CVSS 3.1 vector shape for CVE-2025-40201Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone

Vulnerability timeline

Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.

  1. CVE reservedCVE Program

    The CVE ID was reserved by the assigning CNA.

  2. CVE publishedCVE Program

    The CVE record was published.

  3. CVE updatedCVE Program

    The CVE record metadata indicates this as the latest update time.

Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
LinuxLinux18c91bb2d87268d23868bf13508f5bc9cf04e89a, 18c91bb2d87268d23868bf13508f5bc9cf04e89a, 18c91bb2d87268d23868bf13508f5bc9cf04e89a, 18c91bb2d87268d23868bf13508f5bc9cf04e89a, 18c91bb2d87268d23868bf13508f5bc9cf04e89aunaffected
LinuxLinux5.18, 0, 6.1.157, 6.6.113, 6.12.54, 6.17.4, 6.18affected
Weakness

CWE details

No CWE listed

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.