CVE-2025-40319
Unknown Unknown - Not Provided
BaseFortify

Publication date: 2025-12-08

Last updated on: 2025-12-08

Assigner: kernel.org

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.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2025-12-08
Last Modified
2025-12-08
Generated
2026-06-16
AI Q&A
2025-12-08
EPSS Evaluated
2026-06-15
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
linux kernel *
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-UNKNOWN
Attack-Flow Graph
AI Quick Actions
Instant insights powered by AI
Executive Summary

This vulnerability is a race condition in the Linux kernel's BPF subsystem involving the ring buffer and irq_work. Specifically, irq_work can be queued in bpf_ringbuf_commit(), but if the ring buffer is freed before the irq_work executes, the irq_work thread may access freed memory, leading to potential memory corruption or crashes. The fix involves synchronizing pending irq_work before freeing the ring buffer to prevent this unsafe access.

Impact Analysis

This vulnerability can lead to memory corruption or kernel crashes due to use-after-free conditions when irq_work accesses freed memory. This can cause system instability, potential denial of service, or unpredictable behavior in systems running vulnerable Linux kernel versions.

Mitigation Strategies

Apply the patch that fixes the race condition in the Linux kernel by ensuring that irq_work is synchronized before freeing the ring buffer. Specifically, update your Linux kernel to a version that includes the fix where irq_work_sync(&rb->work) is called before freeing the buffer to prevent use-after-free conditions.

Chat Assistant
Ask questions about this CVE
Hi! I’m here to help you understand CVE-2025-40319. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70
EPSS Chart