CVE-2025-39977 (GCVE-0-2025-39977)
Vulnerability from cvelistv5
Published
2025-10-15 07:55
Modified
2025-10-15 07:55
Severity ?
VLAI Severity ?
EPSS score ?
Summary
In the Linux kernel, the following vulnerability has been resolved:
futex: Prevent use-after-free during requeue-PI
syzbot managed to trigger the following race:
T1 T2
futex_wait_requeue_pi()
futex_do_wait()
schedule()
futex_requeue()
futex_proxy_trylock_atomic()
futex_requeue_pi_prepare()
requeue_pi_wake_futex()
futex_requeue_pi_complete()
/* preempt */
* timeout/ signal wakes T1 *
futex_requeue_pi_wakeup_sync() // Q_REQUEUE_PI_LOCKED
futex_hash_put()
// back to userland, on stack futex_q is garbage
/* back */
wake_up_state(q->task, TASK_NORMAL);
In this scenario futex_wait_requeue_pi() is able to leave without using
futex_q::lock_ptr for synchronization.
This can be prevented by reading futex_q::task before updating the
futex_q::requeue_state. A reference on the task_struct is not needed
because requeue_pi_wake_futex() is invoked with a spinlock_t held which
implies a RCU read section.
Even if T1 terminates immediately after, the task_struct will remain valid
during T2's wake_up_state(). A READ_ONCE on futex_q::task before
futex_requeue_pi_complete() is enough because it ensures that the variable
is read before the state is updated.
Read futex_q::task before updating the requeue state, use it for the
following wakeup.
References
Impacted products
Vendor | Product | Version | |||||||
---|---|---|---|---|---|---|---|---|---|
▼ | Linux | Linux |
Version: 07d91ef510fb16a2e0ca7453222105835b7ba3b8 Version: 07d91ef510fb16a2e0ca7453222105835b7ba3b8 Version: 07d91ef510fb16a2e0ca7453222105835b7ba3b8 Version: 07d91ef510fb16a2e0ca7453222105835b7ba3b8 Version: 07d91ef510fb16a2e0ca7453222105835b7ba3b8 |
||||||
|
{ "containers": { "cna": { "affected": [ { "defaultStatus": "unaffected", "product": "Linux", "programFiles": [ "kernel/futex/requeue.c" ], "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "vendor": "Linux", "versions": [ { "lessThan": "cb5d19a61274b51b49601214a87af573b43d60fa", "status": "affected", "version": "07d91ef510fb16a2e0ca7453222105835b7ba3b8", "versionType": "git" }, { "lessThan": "348736955ed6ca6e99ca24b93b1d3fbfe352c181", "status": "affected", "version": "07d91ef510fb16a2e0ca7453222105835b7ba3b8", "versionType": "git" }, { "lessThan": "a170b9c0dde83312b8b58ccc91509c7c15711641", "status": "affected", "version": "07d91ef510fb16a2e0ca7453222105835b7ba3b8", "versionType": "git" }, { "lessThan": "d824b2dbdcfe3c390278dd9652ea526168ef6850", "status": "affected", "version": "07d91ef510fb16a2e0ca7453222105835b7ba3b8", "versionType": "git" }, { "lessThan": "b549113738e8c751b613118032a724b772aa83f2", "status": "affected", "version": "07d91ef510fb16a2e0ca7453222105835b7ba3b8", "versionType": "git" } ] }, { "defaultStatus": "affected", "product": "Linux", "programFiles": [ "kernel/futex/requeue.c" ], "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "vendor": "Linux", "versions": [ { "status": "affected", "version": "5.15" }, { "lessThan": "5.15", "status": "unaffected", "version": "0", "versionType": "semver" }, { "lessThanOrEqual": "6.1.*", "status": "unaffected", "version": "6.1.155", "versionType": "semver" }, { "lessThanOrEqual": "6.6.*", "status": "unaffected", "version": "6.6.109", "versionType": "semver" }, { "lessThanOrEqual": "6.12.*", "status": "unaffected", "version": "6.12.50", "versionType": "semver" }, { "lessThanOrEqual": "6.16.*", "status": "unaffected", "version": "6.16.10", "versionType": "semver" }, { "lessThanOrEqual": "*", "status": "unaffected", "version": "6.17", "versionType": "original_commit_for_fix" } ] } ], "cpeApplicability": [ { "nodes": [ { "cpeMatch": [ { "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionEndExcluding": "6.1.155", "versionStartIncluding": "5.15", "vulnerable": true }, { "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionEndExcluding": "6.6.109", "versionStartIncluding": "5.15", "vulnerable": true }, { "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionEndExcluding": "6.12.50", "versionStartIncluding": "5.15", "vulnerable": true }, { "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionEndExcluding": "6.16.10", "versionStartIncluding": "5.15", "vulnerable": true }, { "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionEndExcluding": "6.17", "versionStartIncluding": "5.15", "vulnerable": true } ], "negate": false, "operator": "OR" } ] } ], "descriptions": [ { "lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nfutex: Prevent use-after-free during requeue-PI\n\nsyzbot managed to trigger the following race:\n\n T1 T2\n\n futex_wait_requeue_pi()\n futex_do_wait()\n schedule()\n futex_requeue()\n futex_proxy_trylock_atomic()\n futex_requeue_pi_prepare()\n requeue_pi_wake_futex()\n futex_requeue_pi_complete()\n /* preempt */\n\n * timeout/ signal wakes T1 *\n\n futex_requeue_pi_wakeup_sync() // Q_REQUEUE_PI_LOCKED\n futex_hash_put()\n // back to userland, on stack futex_q is garbage\n\n /* back */\n wake_up_state(q-\u003etask, TASK_NORMAL);\n\nIn this scenario futex_wait_requeue_pi() is able to leave without using\nfutex_q::lock_ptr for synchronization.\n\nThis can be prevented by reading futex_q::task before updating the\nfutex_q::requeue_state. A reference on the task_struct is not needed\nbecause requeue_pi_wake_futex() is invoked with a spinlock_t held which\nimplies a RCU read section.\n\nEven if T1 terminates immediately after, the task_struct will remain valid\nduring T2\u0027s wake_up_state(). A READ_ONCE on futex_q::task before\nfutex_requeue_pi_complete() is enough because it ensures that the variable\nis read before the state is updated.\n\nRead futex_q::task before updating the requeue state, use it for the\nfollowing wakeup." } ], "providerMetadata": { "dateUpdated": "2025-10-15T07:55:58.283Z", "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "shortName": "Linux" }, "references": [ { "url": "https://git.kernel.org/stable/c/cb5d19a61274b51b49601214a87af573b43d60fa" }, { "url": "https://git.kernel.org/stable/c/348736955ed6ca6e99ca24b93b1d3fbfe352c181" }, { "url": "https://git.kernel.org/stable/c/a170b9c0dde83312b8b58ccc91509c7c15711641" }, { "url": "https://git.kernel.org/stable/c/d824b2dbdcfe3c390278dd9652ea526168ef6850" }, { "url": "https://git.kernel.org/stable/c/b549113738e8c751b613118032a724b772aa83f2" } ], "title": "futex: Prevent use-after-free during requeue-PI", "x_generator": { "engine": "bippy-1.2.0" } } }, "cveMetadata": { "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "assignerShortName": "Linux", "cveId": "CVE-2025-39977", "datePublished": "2025-10-15T07:55:58.283Z", "dateReserved": "2025-04-16T07:20:57.150Z", "dateUpdated": "2025-10-15T07:55:58.283Z", "state": "PUBLISHED" }, "dataType": "CVE_RECORD", "dataVersion": "5.1", "vulnerability-lookup:meta": { "nvd": "{\"cve\":{\"id\":\"CVE-2025-39977\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-10-15T08:15:35.517\",\"lastModified\":\"2025-10-16T15:29:11.563\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nfutex: Prevent use-after-free during requeue-PI\\n\\nsyzbot managed to trigger the following race:\\n\\n T1 T2\\n\\n futex_wait_requeue_pi()\\n futex_do_wait()\\n schedule()\\n futex_requeue()\\n futex_proxy_trylock_atomic()\\n futex_requeue_pi_prepare()\\n requeue_pi_wake_futex()\\n futex_requeue_pi_complete()\\n /* preempt */\\n\\n * timeout/ signal wakes T1 *\\n\\n futex_requeue_pi_wakeup_sync() // Q_REQUEUE_PI_LOCKED\\n futex_hash_put()\\n // back to userland, on stack futex_q is garbage\\n\\n /* back */\\n wake_up_state(q-\u003etask, TASK_NORMAL);\\n\\nIn this scenario futex_wait_requeue_pi() is able to leave without using\\nfutex_q::lock_ptr for synchronization.\\n\\nThis can be prevented by reading futex_q::task before updating the\\nfutex_q::requeue_state. A reference on the task_struct is not needed\\nbecause requeue_pi_wake_futex() is invoked with a spinlock_t held which\\nimplies a RCU read section.\\n\\nEven if T1 terminates immediately after, the task_struct will remain valid\\nduring T2\u0027s wake_up_state(). A READ_ONCE on futex_q::task before\\nfutex_requeue_pi_complete() is enough because it ensures that the variable\\nis read before the state is updated.\\n\\nRead futex_q::task before updating the requeue state, use it for the\\nfollowing wakeup.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/348736955ed6ca6e99ca24b93b1d3fbfe352c181\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/a170b9c0dde83312b8b58ccc91509c7c15711641\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/b549113738e8c751b613118032a724b772aa83f2\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/cb5d19a61274b51b49601214a87af573b43d60fa\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/d824b2dbdcfe3c390278dd9652ea526168ef6850\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}" } }
Loading…
Loading…
Sightings
Author | Source | Type | Date |
---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.
Loading…