All reports
Medium

kernel: bpf: Sync pending IRQ work before freeing ring buffer

Affected versions

Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported

Exploitation

CVE-2025-40319

Probability of exploitation in the next 30 days: 0.15%

FIRST EPSS · 2026-11-19

Description

In the Linux kernel, the following vulnerability has been resolved: bpf: Sync pending IRQ work before freeing ring buffer Fix a race where irq_work can be queued in bpf_ringbuf_commit() but the ring buffer is freed before the work executes. In the syzbot reproducer, a BPF program attached to sched_switch triggers bpf_ringbuf_commit(), queuing an irq_work. If the ring buffer is freed before this work executes, the irq_work thread may accesses freed memory. Calling irq_work_sync(&rb->work) ensures that all pending irq_work complete before freeing the buffer.

A flaw was found in the Linux kernel's Berkeley Packet Filter (BPF) subsystem. A race condition can occur when an interrupt request (IRQ) work item is queued during a ring buffer commit operation while the ring buffer is being freed before the work executes. A local user with permissions to load BPF programs could exploit this vulnerability to cause a use-after-free condition, resulting in a kernel crash and a denial of service (DoS).