CVE-2025-38346 json
ftrace: Fix UAF when lookup kallsym after ftrace disabled
published 2025-07-10 16 mo ago modified 2026-10-15 24 d ago also EUVD-2025-20900
- cvss
- 7.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.2%
- EPSS 0.2% chance of exploitation in 30 days, percentile 10%
- public exploits
- 0
- none known
Summary
In the Linux kernel, the following vulnerability has been resolved:
ftrace: Fix UAF when lookup kallsym after ftrace disabled
The following issue happens with a buggy module:
BUG: unable to handle page fault for address: ffffffffc05d0218 PGD 1bd66f067 P4D 1bd66f067 PUD 1bd671067 PMD 101808067 PTE 0 Oops: Oops: 0000 [#1] SMP KASAN PTI Tainted: [O]=OOT_MODULE, [E]=UNSIGNED_MODULE Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS RIP: 0010:sized_strscpy+0x81/0x2f0 RSP: 0018:ffff88812d76fa08 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffffffffc0601010 RCX: dffffc0000000000 RDX: 0000000000000038 RSI: dffffc0000000000 RDI: ffff88812608da2d RBP: 8080808080808080 R08: ffff88812608da2d R09: ffff88812608da68 R10: ffff88812608d82d R11: ffff88812608d810 R12: 0000000000000038 R13: ffff88812608da2d R14: ffffffffc05d0218 R15: fefefefefefefeff FS: 00007fef552de740(0000) GS:ffff8884251c7000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffc05d0218 CR3: 00000001146f0000 CR4: 00000000000006f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: <TASK> ftrace_mod_get_kallsym+0x1ac/0x590 update_iter_mod+0x239/0x5b0 s_next+0x5b/0xa0 seq_read_iter+0x8c9/0x1070 seq_read+0x249/0x3b0 proc_reg_read+0x1b0/0x280 vfs_read+0x17f/0x920 ksys_read+0xf3/0x1c0 do_syscall_64+0x5f/0x2e0 entry_SYSCALL_64_after_hwframe+0x76/0x7e
The above issue may happen as follows: (1) Add kprobe tracepoint; (2) insmod test.ko; (3) Module triggers ftrace disabled; (4) rmmod test.ko; (5) cat /proc/kallsyms; --> Will trigger UAF as test.ko already removed; ftrace_mod_get_kallsym() ... strscpy(module_name, mod_map->mod->name, MODULE_NAME_LEN); ...
The problem is when a module triggers an issue with ftrace and sets ftrace_disable. The ftrace_disable is set when an anomaly is discovered and to prevent any more damage, ftrace stops all text modification. The issue that happened was that the ftrace_disable stops more than just the text modification.
When a module is loaded, its init functions can also be traced. Because kallsyms deletes the init functions after a module has loaded, ftrace saves them when the module is loaded and function tracing is enabled. This allows the output of the function trace to show the init function names instead of just their raw memory addresses.
When a module is removed, ftrace_release_mod() is called, and if ftrace_disable is set, it just returns without doing anything more. The problem here is that it leaves the mod_list still around and if kallsyms is called, it will call into this code and access the module memory that has already been freed as it will return:
strscpy(module_name, mod_map->mod->name, MODULE_NAME_LEN);
Where the "mod" no longer exists and triggers a UAF bug.
Patch / fix
- Linux Linux 5.4.295, 5.10.239, 5.15.186, 6.1.142, 6.6.95, 6.12.35, 6.15.4, 6.16
- linux Debian 12 6.1.147-1
- linux Debian 14, Debian 13 6.12.35-1
debian advisories DEBIAN-CVE-2025-38346
- linux Ubuntu 22.04 LTS 5.15.0-156.166
- linux Ubuntu 24.04 LTS 6.8.0-100.100
- linux-aws Ubuntu 22.04 LTS 5.15.0-1092.99
- linux-aws Ubuntu 24.04 LTS 6.8.0-1046.49
- linux-gcp Ubuntu 22.04 LTS 5.15.0-1092.101
- linux-gcp Ubuntu 24.04 LTS 6.8.0-1047.50
- linux-gke Ubuntu 22.04 LTS 5.15.0-1089.95
- linux-gke Ubuntu 24.04 LTS 6.8.0-1043.48
ubuntu advisories UBUNTU-CVE-2025-38346
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- kernel RHEL 10.2 6.12.0-211.7.1.el10_2
- rv RHEL 10.2 6.12.0-211.7.1.el10_2
- perf RHEL 10.2 6.12.0-211.7.1.el10_2
- rtla RHEL 10.2 6.12.0-211.7.1.el10_2
- libperf RHEL 10.2 6.12.0-211.7.1.el10_2
- kernel-rt RHEL 10.2 6.12.0-211.7.1.el10_2
- kernel-64k RHEL 10.2 6.12.0-211.7.1.el10_2
- kernel-core RHEL 10.2 6.12.0-211.7.1.el10_2
red hat advisories RHSA-2026:18134
- kernel AlmaLinux 10 6.12.0-211.7.1.el10_2
- rv AlmaLinux 10 6.12.0-211.7.1.el10_2
- perf AlmaLinux 10 6.12.0-211.7.1.el10_2
- rtla AlmaLinux 10 6.12.0-211.7.1.el10_2
- libperf AlmaLinux 10 6.12.0-211.7.1.el10_2
- kernel-rt AlmaLinux 10 6.12.0-211.7.1.el10_2
- kernel-64k AlmaLinux 10 6.12.0-211.7.1.el10_2
- kernel-core AlmaLinux 10 6.12.0-211.7.1.el10_2
almalinux advisories ALSA-2026:18134
- git.kernel.org/stable/c/d064c68781c19f378af1ae741d9132d35d24b2bb commit
- git.kernel.org/stable/c/8690cd3258455bbae64f809e1d3ee0f043661c71 commit
- git.kernel.org/stable/c/6805582abb720681dd1c87ff677f155dcf4e86c9 commit
- git.kernel.org/stable/c/03a162933c4a03b9f1a84f7d8482903c7e1e11bb commit
- git.kernel.org/stable/c/83a692a9792aa86249d68a8ac0b9d55ecdd255fa commit
- git.kernel.org/stable/c/8e89c17dc8970c5f71a3a991f5724d4c8de42d8c commit
- git.kernel.org/stable/c/f78a786ad9a5443a29eef4dae60cde85b7375129 commit
- git.kernel.org/stable/c/f914b52c379c12288b7623bb814d0508dbe7481d commit
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2025-38346 updated cvss 5.5
kernel: ftrace: Fix UAF when lookup kallsym after ftrace disabled
-
Red Hat Enterprise Linux 8 perf, kernel, bpftool, kernel-rt, kernel-core, kernel-tools, +29 more Red Hat Enterprise Linux 9 rv, perf, rtla, kernel, bpftool, libperf, +83 moreaffected: no fix available “Fix deferred”
-
Red Hat Enterprise Linux AppStream (v. 10) rv 6.12.0-211.7.1.el10_2, perf 6.12.0-211.7.1.el10_2, rtla 6.12.0-211.7.1.el10_2, python3-perf 6.12.0-211.7.1.el10_2, kernel-devel-matched 6.12.0-211.7.1.el10_2, kernel-64k-devel-matched 6.12.0-211.7.1.el10_2, +7 more Red Hat Enterprise Linux BaseOS (v. 10) kernel 6.12.0-211.7.1.el10_2, kernel-64k 6.12.0-211.7.1.el10_2, kernel-core 6.12.0-211.7.1.el10_2, kernel-tools 6.12.0-211.7.1.el10_2, kernel-modules 6.12.0-211.7.1.el10_2, kernel-64k-core 6.12.0-211.7.1.el10_2, +28 more Red Hat Enterprise Linux CodeReady Linux Builder (v. 10) libperf 6.12.0-211.7.1.el10_2, kernel-debuginfo-common-s390x 6.12.0-211.7.1.el10_2, kernel-debuginfo-common-x86_64 6.12.0-211.7.1.el10_2, kernel-debuginfo-common-aarch64 6.12.0-211.7.1.el10_2, kernel-debuginfo-common-ppc64le 6.12.0-211.7.1.el10_2 Red Hat Enterprise Linux Real Time (v. 10) kernel-rt 6.12.0-211.7.1.el10_2, kernel-rt-64k 6.12.0-211.7.1.el10_2, kernel-rt-core 6.12.0-211.7.1.el10_2, kernel-rt-modules 6.12.0-211.7.1.el10_2, kernel-rt-64k-core 6.12.0-211.7.1.el10_2, kernel-rt-debug-core 6.12.0-211.7.1.el10_2, +14 more Red Hat Enterprise Linux Real Time for NFV (v. 10) kernel-rt 6.12.0-211.7.1.el10_2, kernel-rt-core 6.12.0-211.7.1.el10_2, kernel-rt-modules 6.12.0-211.7.1.el10_2, kernel-rt-debug-core 6.12.0-211.7.1.el10_2, kernel-rt-modules-core 6.12.0-211.7.1.el10_2, kernel-rt-debug-modules 6.12.0-211.7.1.el10_2, +4 morefixed: vendor fix RHSA-2026:18134
-
Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 more Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 morenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
- Assessed
- 24 d ago
Exploit prediction
0.20% chance of exploitation in the next 30 days, higher than 10% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Affected products
- Linux Linux
Classification
- Weakness
-
- CWE-416 Use After Free
- Technology feeds
References
-
git.kernel.org
/stable/c/d064c68781c19f378af1ae741d9132d35d24b2bb
patch
-
git.kernel.org
/stable/c/8690cd3258455bbae64f809e1d3ee0f043661c71
patch
-
git.kernel.org
/stable/c/6805582abb720681dd1c87ff677f155dcf4e86c9
patch
-
git.kernel.org
/stable/c/03a162933c4a03b9f1a84f7d8482903c7e1e11bb
patch
-
git.kernel.org
/stable/c/83a692a9792aa86249d68a8ac0b9d55ecdd255fa
patch
-
git.kernel.org
/stable/c/8e89c17dc8970c5f71a3a991f5724d4c8de42d8c
patch
-
git.kernel.org
/stable/c/f78a786ad9a5443a29eef4dae60cde85b7375129
patch
-
git.kernel.org
/stable/c/f914b52c379c12288b7623bb814d0508dbe7481d
patch
-
lists.debian.org
/debian-lts-announce/2025/10/msg00008.html
third-party-advisory
-
lists.debian.org
/debian-lts-announce/2025/10/msg00007.html
third-party-advisory
Sources
- CVE List CVE-2025-38346
- NVD CVE-2025-38346
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.