CVE-2026-139345

Not scored yetLast modified Nov 30, 2026

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.

Metrics

No CVSS score has been published yet.

Affected software

Source: the vendor's advisory (CNA). NVD analysis pending.

No affected versions have been published.

Timeline

Published
Nov 30, 2026
Last modified
Nov 30, 2026
NVD status
Received

Related CVEs from 2026

CVE-2026-139346In the Linux kernel, the following vulnerability has been resolved: bpf: Fix NULL task dereference in task work cancellation bpf_task_workCVE-2026-139347In the Linux kernel, the following vulnerability has been resolved: ublk: use global index for reported zones ublk_report_zones() may spliCVE-2026-1393487.8In the Linux kernel, the following vulnerability has been resolved: net/smc: hold a reference on net_device returned by pnet_find_base_ndevCVE-2026-139349In the Linux kernel, the following vulnerability has been resolved: f2fs: quota: fix quota flush failure during filesystem freeze Quota flCVE-2026-139356.5Side-channel information leakage in ComputePressure in Google Chrome prior to 150.0.7871.47 allowed a remote attacker to leak cross-origin dCVE-2026-139350In the Linux kernel, the following vulnerability has been resolved: IB/rdmavt: Fix error unwind path for qp_priv_init() in rvt_create_qp() CVE-2026-139351In the Linux kernel, the following vulnerability has been resolved: ALSA: core: Serialize snd_refcount put and sync When a thread tries toCVE-2026-1393527.8In the Linux kernel, the following vulnerability has been resolved: IB/mlx4: Avoid requeueing executing CM timeout work id->scheduled_deleCVE-2026-139353In the Linux kernel, the following vulnerability has been resolved: ASoC: rt5645: Shut down the button timer on removal jack_detect_work cCVE-2026-1393547.1In the Linux kernel, the following vulnerability has been resolved: RDMA/rxe: bound the WQE opcode before indexing rxe_wr_opcode_info[] wrCVE-2026-1393557.0In the Linux kernel, the following vulnerability has been resolved: RDMA/rxe: Hold netdev reference for transmit skbs rxe_init_packet() asCVE-2026-1393567.1In the Linux kernel, the following vulnerability has been resolved: RDMA/rxe: validate inline sge_offset in finish_packet() before indexing
CVE-2026-139345: Unscored | Vulnix