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-05-07
AI Q&A
2025-12-08
EPSS Evaluated
2026-05-05
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 Powered Q&A
Can you explain this vulnerability to me?

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.


How can this vulnerability impact me? :

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.


What immediate steps should I take to mitigate this vulnerability?

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.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart