CVE-2025-40341

Source
https://cve.org/CVERecord?id=CVE-2025-40341
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-40341.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-40341
Downstream
Related
Published
2025-12-09T04:09:58.392Z
Modified
2026-03-20T12:43:16.228667Z
Summary
futex: Don't leak robust_list pointer on exec race
Details

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

futex: Don't leak robust_list pointer on exec race

sysgetrobustlist() and compatgetrobustlist() use ptracemayaccess() to check if the calling task is allowed to access another task's robust_list pointer. This check is racy against a concurrent exec() in the target process.

During exec(), a task may transition from a non-privileged binary to a privileged one (e.g., setuid binary) and its credentials/memory mappings may change. If getrobustlist() performs ptracemayaccess() before this transition, it may erroneously allow access to sensitive information after the target becomes privileged.

A racy access allows an attacker to exploit a window during which ptracemayaccess() passes before a target process transitions to a privileged state via exec().

For example, consider a non-privileged task T that is about to execute a setuid-root binary. An attacker task A calls getrobustlist(T) while T is still unprivileged. Since ptracemayaccess() checks permissions based on current credentials, it succeeds. However, if T begins exec immediately afterwards, it becomes privileged and may change its memory mappings. Because getrobustlist() proceeds to access T->robust_list without synchronizing with exec() it may read user-space pointers from a now-privileged process.

This violates the intended post-exec access restrictions and could expose sensitive memory addresses or be used as a primitive in a larger exploit chain. Consequently, the race can lead to unauthorized disclosure of information across privilege boundaries and poses a potential security risk.

Take a read lock on signal->execupdatelock prior to invoking ptracemayaccess() and accessing the robustlist/compatrobust_list. This ensures that the target task's exec state remains stable during the check, allowing for consistent and synchronized validation of credentials.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40341.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
0771dfefc9e538f077d0b43b6dec19a5a67d0e70
Fixed
6511984d1aa1360181bcafb1ca75df7f291ef237
Fixed
4aced32596ead1820b7dbd8e40d30b30dc1f3ad4
Fixed
3b4222494489f6d4b8705a496dab03384b7ca998
Fixed
b524455a51feb6013df3a5dba3160487b2e8e22a
Fixed
6b54082c3ed4dc9821cdf0edb17302355cc5bb45

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-40341.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
2.6.17
Fixed
6.1.159
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.6.117
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.12.58
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.17.8

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-40341.json"