Skip to content
Medium 4.4

bpf: Prevent task work context reuse while irq_work is busy

CVE-2026-139345 First seen on SecPulse

Affected packages

PackageAffected → Fixed
LinuxLinux —
LinuxKernel
≥ 6.18.0, < 6.18.65→ 6.18.65
≥ 6.19.0, < 7.3.6→ 7.3.6

Fix status by distribution

Records published by each distribution for this CVE. Fixed versions differ by release; check each link.

Original description The description as published by the source.

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 invocation…

Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details