CVE-2025-39813
Last modified
CVE-2025-39813 is a medium-severity vulnerability rated 4.7/10 on the CVSS scale. In the Linux kernel, the following vulnerability has been resolved: ftrace: Fix potential warning in trace_printk_seq during ftrace_dump When calling ftrace_dump_one() concurrently with reading trace_pipe, a WARN_ON_ONCE() in trace_printk_seq() can be triggered due to a race condition. The issue occurs because: CPU0 (ftrace_dump) CPU1 (reader) echo z > /proc/sysrq-trigger !trace_empty(&iter) trace_iterator_reset(&iter) <- len = size = 0 cat /sys/kernel/tracing/trace_pipe trace_find_next_entry_inc(&iter) __find_next_entry ring_buffer_empty_cpu <- all empty return NULL trace_printk_seq(&iter.seq) WARN_ON_ONCE(s->seq.len >= s->seq.size) In the context between trace_empty() and trace_find_next_entry_inc() during ftrace_dump, the ring buffer data was consumed by other readers. This caused trace_find_next_entry_inc to return NULL, failing to populate `iter.seq`. At this point, due to the prior trace_iterator_reset, both `iter.seq.len` and `iter.seq.size` were set to 0. EPSS estimates a 0.11% chance of exploitation in the next 30 days.
Description
In the Linux kernel, the following vulnerability has been resolved: ftrace: Fix potential warning in trace_printk_seq during ftrace_dump When calling ftrace_dump_one() concurrently with reading trace_pipe, a WARN_ON_ONCE() in trace_printk_seq() can be triggered due to a race condition. The issue occurs because: CPU0 (ftrace_dump) CPU1 (reader) echo z > /proc/sysrq-trigger !trace_empty(&iter) trace_iterator_reset(&iter) <- len = size = 0 cat /sys/kernel/tracing/trace_pipe trace_find_next_entry_inc(&iter) __find_next_entry ring_buffer_empty_cpu <- all empty return NULL trace_printk_seq(&iter.seq) WARN_ON_ONCE(s->seq.len >= s->seq.size) In the context between trace_empty() and trace_find_next_entry_inc() during ftrace_dump, the ring buffer data was consumed by other readers. This caused trace_find_next_entry_inc to return NULL, failing to populate `iter.seq`. At this point, due to the prior trace_iterator_reset, both `iter.seq.len` and `iter.seq.size` were set to 0. Since they are equal, the WARN_ON_ONCE condition is triggered. Move the trace_printk_seq() into the if block that checks to make sure the return value of trace_find_next_entry_inc() is non-NULL in ftrace_dump_one(), ensuring the 'iter.seq' is properly populated before subsequent operations.
Metrics
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
Weakness Enumeration
Affected Software
| Vendor | Product | Versions | Update |
|---|---|---|---|
| Linux | Linux Kernel | >= 2.6.28, < 5.4.298 | — |
| Linux | Linux Kernel | >= 5.5, < 5.10.242 | — |
| Linux | Linux Kernel | >= 5.11, < 5.15.191 | — |
| Linux | Linux Kernel | >= 5.16, < 6.1.150 | — |
| Linux | Linux Kernel | >= 6.2, < 6.6.104 | — |
| Linux | Linux Kernel | >= 6.7, < 6.12.45 | — |
| Linux | Linux Kernel | >= 6.13, < 6.16.5 | — |
| Linux | Linux Kernel | 6.17 | Rc1 |
| Debian | Debian Linux | 11.0 | — |
References
- https://lists.debian.org/debian-lts-announce/2025/10/msg00007.htmlThird Party Advisory
- https://lists.debian.org/debian-lts-announce/2025/10/msg00008.htmlThird Party Advisory
Timeline
- Published
- Last Modified
- Status
- Modified
Frequently Asked Questions
What is CVE-2025-39813?
How severe is CVE-2025-39813?
How do I fix CVE-2025-39813?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2025
- CVE-2025-39808In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2025-39809In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2025-3981A vulnerability, which was classified as problematic, has be…5.3
- CVE-2025-39810In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2025-39811In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2025-39812In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2025-39814In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2025-39815In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2025-39816In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2025-39817In the Linux kernel, the following vulnerability has been re…7.1
- CVE-2025-39818In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2025-39819In the Linux kernel, the following vulnerability has been re…5.5
Are you affected by CVE-2025-39813?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
