# CVE-2025-38346: ftrace: Fix UAF when lookup kallsym after ftrace disabled

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.32% (percentile 17, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2025-07-10T08:15:14.290Z
- **Modified:** 2026-10-15T22:18:39.147Z

## Who should check

- Anyone running Linux \>= aba4b5c22cbac296f4081a0476d0c55828f135b4, \< d064c68781c19f378af1ae741d9132d35d24b2bb; \>= aba4b5c22cbac296f4081a0476d0c55828f135b4, \< 8690cd3258455bbae64f809e1d3ee0f043661c71; \>= aba4b5c22cbac296f4081a0476d0c55828f135b4, \< 6805582abb720681dd1c87ff677f155dcf4e86c9; \>= aba4b5c22cbac296f4081a0476d0c55828f135b4, \< 03a162933c4a03b9f1a84f7d8482903c7e1e11bb; \>= aba4b5c22cbac296f4081a0476d0c55828f135b4, \< 83a692a9792aa86249d68a8ac0b9d55ecdd255fa; \>= aba4b5c22cbac296f4081a0476d0c55828f135b4, \< 8e89c17dc8970c5f71a3a991f5724d4c8de42d8c; \>= aba4b5c22cbac296f4081a0476d0c55828f135b4, \< f78a786ad9a5443a29eef4dae60cde85b7375129; \>= aba4b5c22cbac296f4081a0476d0c55828f135b4, \< f914b52c379c12288b7623bb814d0508dbe7481d
- Anyone running Linux 4.15

## Description

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.

## Affected and fixed versions

- Linux: \>= aba4b5c22cbac296f4081a0476d0c55828f135b4, \< d064c68781c19f378af1ae741d9132d35d24b2bb; \>= aba4b5c22cbac296f4081a0476d0c55828f135b4, \< 8690cd3258455bbae64f809e1d3ee0f043661c71; \>= aba4b5c22cbac296f4081a0476d0c55828f135b4, \< 6805582abb720681dd1c87ff677f155dcf4e86c9; \>= aba4b5c22cbac296f4081a0476d0c55828f135b4, \< 03a162933c4a03b9f1a84f7d8482903c7e1e11bb; \>= aba4b5c22cbac296f4081a0476d0c55828f135b4, \< 83a692a9792aa86249d68a8ac0b9d55ecdd255fa; \>= aba4b5c22cbac296f4081a0476d0c55828f135b4, \< 8e89c17dc8970c5f71a3a991f5724d4c8de42d8c; \>= aba4b5c22cbac296f4081a0476d0c55828f135b4, \< f78a786ad9a5443a29eef4dae60cde85b7375129; \>= aba4b5c22cbac296f4081a0476d0c55828f135b4, \< f914b52c379c12288b7623bb814d0508dbe7481d (cvelist)
- Linux: 4.15 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-38346. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-38346.md
Affected: Linux >= aba4b5c22cbac296f4081a0476d0c55828f135b4, < d064c68781c19f378af1ae741d9132d35d24b2bb; >= aba4b5c22cbac296f4081a0476d0c55828f135b4, < 8690cd3258455bbae64f809e1d3ee0f043661c71; >= aba4b5c22cbac296f4081a0476d0c55828f135b4, < 6805582abb720681dd1c87ff677f155dcf4e86c9; >= aba4b5c22cbac296f4081a0…
Fixed in: Linux 8690cd3258455bbae64f809e1d3ee0f043661c71, Linux 6805582abb720681dd1c87ff677f155dcf4e86c9, Linux 03a162933c4a03b9f1a84f7d8482903c7e1e11bb, Linux 83a692a9792aa86249d68a8ac0b9d55ecdd255fa, Linux 8e89c17dc8970c5f71a3a991f5724d4c8de42d8c

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-38346 being exploited?

There is no confirmed exploitation: CVE-2025-38346 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.32% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-38346?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2025-38346?

Linux \>= aba4b5c22cbac296f4081a0476d0c55828f135b4, \< d064c68781c19f378af1ae741d9132d35d24b2bb; \>= aba4b5c22cbac296f4081a0476d0c55828f135b4, \< 8690cd3258455bbae64f809e1d3ee0f043661c71; \>= aba4b5c22cbac296f4081a0476d0c55828f135b4, \< 6805582abb720681dd1c87ff677f155dcf4e86c9; \>= aba4b5c22cbac296f4081a0476d0c55828f135b4, \< 03a162933c4a03b9f1a84f7d8482903c7e1e11bb; \>= aba4b5c22cbac296f4081a0476d0c55828f135b4, \< 83a692a9792aa86249d68a8ac0b9d55ecdd255fa; \>= aba4b5c22cbac296f4081a0476d0c55828f135b4, \< 8e89c17dc8970c5f71a3a991f5724d4c8de42d8c; \>= aba4b5c22cbac296f4081a0476d0c55828f135b4, \< f78a786ad9a5443a29eef4dae60cde85b7375129; \>= aba4b5c22cbac296f4081a0476d0c55828f135b4, \< f914b52c379c12288b7623bb814d0508dbe7481d; Linux 4.15.

### Is there a fix for CVE-2025-38346?

Yes. Fixed in Linux 8690cd3258455bbae64f809e1d3ee0f043661c71, Linux 6805582abb720681dd1c87ff677f155dcf4e86c9, Linux 03a162933c4a03b9f1a84f7d8482903c7e1e11bb, Linux 83a692a9792aa86249d68a8ac0b9d55ecdd255fa, Linux 8e89c17dc8970c5f71a3a991f5724d4c8de42d8c. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2025-38346?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/d064c68781c19f378af1ae741d9132d35d24b2bb>
- patch: <https://git.kernel.org/stable/c/8690cd3258455bbae64f809e1d3ee0f043661c71>
- patch: <https://git.kernel.org/stable/c/6805582abb720681dd1c87ff677f155dcf4e86c9>
- patch: <https://git.kernel.org/stable/c/03a162933c4a03b9f1a84f7d8482903c7e1e11bb>
- patch: <https://git.kernel.org/stable/c/83a692a9792aa86249d68a8ac0b9d55ecdd255fa>
- patch: <https://git.kernel.org/stable/c/8e89c17dc8970c5f71a3a991f5724d4c8de42d8c>
- patch: <https://git.kernel.org/stable/c/f78a786ad9a5443a29eef4dae60cde85b7375129>
- patch: <https://git.kernel.org/stable/c/f914b52c379c12288b7623bb814d0508dbe7481d>
- other: <https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html>
- other: <https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-38346>

HTML: <https://flawdb.com/CVE-2025-38346> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-38346>
