CVE-2025-39813
kernel: Linux kernel: Denial of Service in ftrace due to race condition in trace_printk_seq
Overview
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.
Source: OX vulnerability database
Severity
4.7 · MEDIUM
CVSS 3.1 base score, scored by NVD.
- Attack vector
- Local
- Attack complexity
- High
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- None
- Availability
- High
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
Weakness: CWE-362
Affected packages · 0
No registry package. This ID affects operating system packages only.
Operating systems · 103 fixes
Azure Linux 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 3.0 | kernel | 0:6.6.104.2-1.azl3 |
Oracle Linux 3 releases · 2 packages
| Release | Package | Fixed in |
|---|---|---|
| 7 | kernel-uek +7 | 5.4.17-2136.348.3.el7uek |
| 8 | bpftool +13 | 5.15.0-314.193.5.3.el8uek |
| 9 | bpftool +3 | 5.15.0-314.193.5.3.el9uek |
| 9 | kernel-uek +34 | 6.12.0-105.51.5.el9uek |
Photon OS 2 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 4.0 | bpftool +9 | 5.10.244-1.ph4 |
| 5.0 | bpftool +10 | 6.1.153-1.ph5 |
Red Hat 3 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 7 | bpftool +25 | affected |
| 8 | bpftool +45 | affected |
| 9 | bpftool +106 | affected |
SUSE Linux Enterprise 4 releases · 12 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 12.5 | kgraft-patch-4-12-14-122-293-default | 1-8.3.1 | SUSE-SU-2026:0473-1 |
| 12.5 | kgraft-patch-4-12-14-122-280-default | 1-8.5.1 | SUSE-SU-2025:4189-1 |
| 12.5 | cluster-md-kmp-default +13 | 4.12.14-122.280.1 | SUSE-SU-2025:4189-1 |
| 15.6 | kernel-livepatch-6-4-0-150600-10-58-rt | 1-150600.1.3.1 | SUSE-SU-2025:4301-1 |
| 15.6 | kernel-livepatch-6-4-0-150600-23-87-default | 1-150600.13.3.1 | SUSE-SU-2026:0471-1 |
| 15.6 | kernel-livepatch-6-4-0-150600-23-78-default | 1-150600.13.5.1 | SUSE-SU-2025:4140-1 |
13 more rows
SUSE Linux Enterprise Micro 3 releases · 4 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 6.0 | kernel-default +5 | 6.4.0-36.1 | SUSE-SU-2025:21040-1 |
| 6.0 | kernel-default-base | 6.4.0-36.1.21.13 | SUSE-SU-2025:21040-1 |
| 6.0 | kernel-devel-rt +3 | 6.4.0-38.1 | SUSE-SU-2025:21052-1 |
| 6.1 | kernel-default +6 | 6.4.0-36.1 | SUSE-SU-2025:21056-1 |
| 6.1 | kernel-default-base | 6.4.0-36.1.21.13 | SUSE-SU-2025:21056-1 |
| 6.1 | kernel-devel-rt +4 | 6.4.0-38.1 | SUSE-SU-2025:21064-1 |
2 more rows
amazon linux 1 release · 3 packages
| Release | Package | Fixed in |
|---|---|---|
| 2023 | kernel-livepatch-6-1-150-174-273 +1 | 1:1.0-0.amzn2023 |
| 2023 | bpftool +20 | 1:6.1.150-174.273.amzn2023 |
| 2023 | bpftool6-12 +20 | 1:6.12.46-66.121.amzn2023 |
debian 4 releases · 2 packages
| Release | Package | Fixed in |
|---|---|---|
| 11 | linux | 5.10.244-1 |
| 11 | linux-6-1 | 6.1.153-1~deb11u1 |
| 12 | linux | 6.1.153-1 |
| 13 | linux | 6.12.48-1 |
| 14 | linux | 6.16.5-1 |
echo 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| linux | 1 |
openSUSE Leap 1 release · 3 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 16.0 | cluster-md-kmp-azure +9 | 6.12.0-160000.26.1 | openSUSE-SU-2026:20287-1 |
| 16.0 | cluster-md-kmp-64kb +64 | 6.12.0-160000.6.1 | openSUSE-SU-2025:20081-1 |
| 16.0 | kernel-default-base | 6.12.0-160000.6.1.160000.2.4 | openSUSE-SU-2025:20081-1 |
root.io debian 3 releases · 2 packages
| Release | Package | Fixed in |
|---|---|---|
| 11 | linux +1 | 5.10.244-1 |
| 12 | rootio-linux | 6.1.153-1 |
| 13 | rootio-linux | 6.12.48-1 |
root.io ubuntu 2 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 22.04 | linux +1 | 5.15.0-163.173 |
| 24.04 | linux +1 | 6.8.0-106.106 |
ubuntu 3 releases · 38 packages
| Release | Package | Fixed in |
|---|---|---|
| 20.04-ESM | linux-nvidia-tegra-5-15 | 5.15.0-1049.49~20.04.1 |
| 20.04-ESM | linux-ibm-5-15 | 5.15.0-1091.94~20.04.1 |
| 20.04-ESM | linux-riscv-5-15 | 5.15.0-1092.96~20.04.1 |
| 20.04-ESM | linux-intel-iotg-5-15 | 5.15.0-1092.98~20.04.1 |
| 20.04-ESM | linux-oracle-5-15 | 5.15.0-1094.100~20.04.1 |
| 20.04-ESM | linux-aws-5-15 | 5.15.0-1097.104~20.04.1 |
43 more rows
References
- access.redhat.com https://access.redhat.com/security/cve/CVE-2025-39813
- cert-portal.siemens.com https://cert-portal.siemens.com/productcert/html/ssa-032379.html
- git.kernel.org https://git.kernel.org/linus/4013aef2ced9b756a410f50d12df9ebe6a883e4a (6.17-rc3)
- git.kernel.org https://git.kernel.org/stable/c/28c8fb7ae2ad27d81c8de3c4fe608c509f6a18aa
- git.kernel.org https://git.kernel.org/stable/c/4013aef2ced9b756a410f50d12df9ebe6a883e4a
- git.kernel.org https://git.kernel.org/stable/c/5ab0ec206deb99eb3baf8f1d7602aeaa91dbcc85
- git.kernel.org https://git.kernel.org/stable/c/a6f0f8873cc30fd4543b09adf03f7f51d293f0e6
- git.kernel.org https://git.kernel.org/stable/c/ced94e137e6cd5e79c65564841d3b7695d0f5fa3
- git.kernel.org https://git.kernel.org/stable/c/e80ff23ba8bdb0f41a1afe2657078e4097d13a9a
- git.kernel.org https://git.kernel.org/stable/c/f299353e7ccbcc5c2ed8993c48fbe7609cbe729a
Show all 37 references
- git.kernel.org https://git.kernel.org/stable/c/fbd4cf7ee4db65ef36796769fe978e9eba6f0de4
- linux.oracle.com https://linux.oracle.com/cve/CVE-2025-39813.html
- linux.oracle.com https://linux.oracle.com/errata/ELSA-2025-25757.html
- lists.debian.org https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html
- lists.debian.org https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html
- lore.kernel.org https://lore.kernel.org/linux-cve-announce/2025091614-CVE-2025-39813-295c@gregkh/T
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2025-39813
- ubuntu.com https://ubuntu.com/security/notices/USN-7909-1
- ubuntu.com https://ubuntu.com/security/notices/USN-7909-2
- ubuntu.com https://ubuntu.com/security/notices/USN-7909-3
- ubuntu.com https://ubuntu.com/security/notices/USN-7909-4
- ubuntu.com https://ubuntu.com/security/notices/USN-7909-5
- ubuntu.com https://ubuntu.com/security/notices/USN-7910-1
- ubuntu.com https://ubuntu.com/security/notices/USN-7910-2
- ubuntu.com https://ubuntu.com/security/notices/USN-7933-1
- ubuntu.com https://ubuntu.com/security/notices/USN-7938-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8095-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8095-2
- ubuntu.com https://ubuntu.com/security/notices/USN-8095-3
- ubuntu.com https://ubuntu.com/security/notices/USN-8095-4
- ubuntu.com https://ubuntu.com/security/notices/USN-8095-5
- ubuntu.com https://ubuntu.com/security/notices/USN-8100-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8125-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8126-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8165-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8261-1
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2025-39813
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.