CVE-2026-139345
publishedbpf: Prevent task work context reuse while irq_work is busy
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linux38aa7003e369802f81a078f6673d10d97013f04f to < 120ccbbc27889969eabba94c069784d5597d3dfb · 38aa7003e369802f81a078f6673d10d97013f04f to < a00b81c2b3b81d1dd67a4c20b40af322cacf99e2 · 38aa7003e369802f81a078f6673d10d97013f04f to < a36d9afe8d923ca00dd2001409f420202ee672da · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux6.18 (affected) · 0 to < 6.18 (unaffected · semver) · 6.18.65 through 6.18.* (unaffected · semver) · 7.3.6 through 7.3.* (unaffected · semver) · 7.4-rc1 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
| Amazon Linux | AL2 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Not Affected; Pending Fix | Not stated | Amazon Linux assessment |
Description
In the Linux kernel, the following vulnerability has been resolved: bpf: Prevent task work context reuse while irq_work is busy A bpf_task_work context can return to STANDBY before its scheduling irq_work handler returns. Both callback completion and task_work_add() failure can publish STANDBY while the irq_work is still BUSY. A new round can then reinitialize and queue the same irq_work on another CPU while the old handler is still running. One concrete interleaving is: 1. CPU 0 successfully queues ctx->work with task_work_add() and pauses before its SCHEDULING-to-SCHEDULED cmpxchg. 2. The target task on CPU 1 completes the callback, resets ctx->task and publishes STANDBY. 3. CPU 2 starts a new round, changes STANDBY to PENDING and queues the same irq_work. The new handler changes PENDING to SCHEDULING, but task_work_add() returns -ESRCH because its target task has exited. The handler has not yet reset the context or rolled back the state. 4. CPU 0 resumes and changes the new round's SCHEDULING to SCHEDULED, even though no task work was queued for that round. 5. The new handler resets ctx->task, but its SCHEDULING-to-STANDBY cmpxchg fails. The context remains SCHEDULED with a NULL task, and subsequent attempts to acquire this context fail with -EBUSY. 6. Map-value deletion observes SCHEDULED and queues asynchronous cancellation, which passes the NULL ctx->task to task_work_cancel(). Overlapping invocations also share one BUSY bit. An invocation can clear that bit while the other invocation is still running. Initialize the scheduling irq_work when the context is created and stop reinitializing it for each round. After claiming the context with the STANDBY-to-PENDING cmpxchg, check BUSY and reject reuse with -EBUSY if a previous invocation is still in progress. Checking after the cmpxchg orders the BUSY read after the STANDBY publication. No irq_work has been queued for the attempted round at this point, so the rejection can roll PENDING back to STANDBY. Use cmpxchg for that rollback to preserve FREED if a concurrent deletion has published it. Once BUSY clears, scheduling can be retried.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
No normalized assessments.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | 38aa7003e369802f81a078f6673d10d97013f04f to < 120ccbbc27889969eabba94c069784d5597d3dfb (affected · git)38aa7003e369802f81a078f6673d10d97013f04f to < a00b81c2b3b81d1dd67a4c20b40af322cacf99e2 (affected · git)38aa7003e369802f81a078f6673d10d97013f04f to < a36d9afe8d923ca00dd2001409f420202ee672da (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 6.18 (affected)0 to < 6.18 (unaffected · semver)6.18.65 through 6.18.* (unaffected · semver)7.3.6 through 7.3.* (unaffected · semver)7.4-rc1 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
3Provider assertions
1Linux · cna
bpf: Prevent task work context reuse while irq_work is busy
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 0ab1c4ea51aab26a282db780b2bad2d1a0e3c533692e2abe32426ff404509359
- Ingested
- 30 Nov 2026, 13:42:23 UTC
- Source record
- Official CVE record