Search CVEs and advisories

Search CVEs and Linux security advisories by vendor, product, package, or severity, and see which vulnerabilities each advisory addresses.

CVE

CVE-2025-22069

published high CVSS 3.1 · 7.8

riscv: fgraph: Fix stack layout to match __arch_ftrace_regs argument of ftrace_return_to_handler

Published
16 Apr 2025, 14:12:22 UTC
Updated
05 Aug 2026, 11:56:30 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
Linux — Linux33d4e904e24d14ff0fbc528b657ddc7c7b636e6a to < 7ed384db061a264bd806898f7ccab9b98b591488 · a3ed4157b7d89800a0008de0c9e46a438a5c3745 to < 78b39c587b8f6c69140177108f9c08a75b1c7c37 · a3ed4157b7d89800a0008de0c9e46a438a5c3745 to < 67a5ba8f742f247bc83e46dd2313c142b1383276 · 6.12.75 to < 6.12.92 · Other versions: unaffected Affected Not stated Linux
Linux — Linux6.14 (affected) · 0 to < 6.14 (unaffected · semver) · 6.12.92 through 6.12.* (unaffected · semver) · 6.14.2 through 6.14.* (unaffected · semver) · 6.15 and later (unaffected · original_commit_for_fix) · Other versions: affected Version-specific Not stated Linux
Amazon Linux AL2 Release evaluation Not Affected Not required Amazon Linux assessment
Amazon Linux AL2023 Release evaluation Not Affected Not required Amazon Linux assessment
Debian trixie linux Advisory build 6.12.94-1 DSA-6355-1
Ubuntu plucky bpftool Advisory build 7.6.0+6.14.0-22.22 USN-7594-1
Ubuntu plucky linux Advisory build 6.14.0-22.22 USN-7594-1
Ubuntu plucky linux-aws Advisory build 6.14.0-1007.7 USN-7594-3
Show 96 more entries
Distro / vendorReleasePackage / productPublisher statusFixed buildSource
Ubuntu plucky linux-aws-cloud-tools-6.14.0-1007 Advisory build 6.14.0-1007.7 USN-7594-3
Ubuntu plucky linux-aws-headers-6.14.0-1007 Advisory build 6.14.0-1007.7 USN-7594-3
Ubuntu plucky linux-aws-tools-6.14.0-1007 Advisory build 6.14.0-1007.7 USN-7594-3
Ubuntu plucky linux-azure Advisory build 6.14.0-1007.7 USN-7594-2
Ubuntu plucky linux-azure-cloud-tools-6.14.0-1007 Advisory build 6.14.0-1007.7 USN-7594-2
Ubuntu plucky linux-azure-headers-6.14.0-1007 Advisory build 6.14.0-1007.7 USN-7594-2
Ubuntu plucky linux-azure-tools-6.14.0-1007 Advisory build 6.14.0-1007.7 USN-7594-2
Ubuntu plucky linux-bpf-dev Advisory build 6.14.0-22.22 USN-7594-1
Ubuntu plucky linux-buildinfo-6.14.0-1004-realtime Advisory build 6.14.0-1004.4 USN-7594-1
Ubuntu plucky linux-buildinfo-6.14.0-1007-aws Advisory build 6.14.0-1007.7 USN-7594-3
Ubuntu plucky linux-buildinfo-6.14.0-1007-aws-64k Advisory build 6.14.0-1007.7 USN-7594-3
Ubuntu plucky linux-buildinfo-6.14.0-1007-azure Advisory build 6.14.0-1007.7 USN-7594-2
Ubuntu plucky linux-buildinfo-6.14.0-1007-oracle Advisory build 6.14.0-1007.7 USN-7594-3
Ubuntu plucky linux-buildinfo-6.14.0-1007-oracle-64k Advisory build 6.14.0-1007.7 USN-7594-3
Ubuntu plucky linux-buildinfo-6.14.0-1007-raspi Advisory build 6.14.0-1007.7 USN-7594-1
Ubuntu plucky linux-buildinfo-6.14.0-1008-gcp Advisory build 6.14.0-1008.8 USN-7594-1
Ubuntu plucky linux-buildinfo-6.14.0-1008-gcp-64k Advisory build 6.14.0-1008.8 USN-7594-1
Ubuntu plucky linux-buildinfo-6.14.0-22-generic Advisory build 6.14.0-22.22 USN-7594-1
Ubuntu plucky linux-buildinfo-6.14.0-22-generic-64k Advisory build 6.14.0-22.22 USN-7594-1
Ubuntu plucky linux-cloud-tools-6.14.0-1004-realtime Advisory build 6.14.0-1004.4 USN-7594-1
Ubuntu plucky linux-cloud-tools-6.14.0-1007-aws Advisory build 6.14.0-1007.7 USN-7594-3
Ubuntu plucky linux-cloud-tools-6.14.0-1007-aws-64k Advisory build 6.14.0-1007.7 USN-7594-3
Ubuntu plucky linux-cloud-tools-6.14.0-1007-azure Advisory build 6.14.0-1007.7 USN-7594-2
Ubuntu plucky linux-cloud-tools-6.14.0-22 Advisory build 6.14.0-22.22 USN-7594-1
Ubuntu plucky linux-cloud-tools-6.14.0-22-generic Advisory build 6.14.0-22.22 USN-7594-1
Ubuntu plucky linux-cloud-tools-common Advisory build 6.14.0-22.22 USN-7594-1
Ubuntu plucky linux-gcp Advisory build 6.14.0-1008.8 USN-7594-1
Ubuntu plucky linux-gcp-headers-6.14.0-1008 Advisory build 6.14.0-1008.8 USN-7594-1
Ubuntu plucky linux-gcp-tools-6.14.0-1008 Advisory build 6.14.0-1008.8 USN-7594-1
Ubuntu plucky linux-headers-6.14.0-1004-realtime Advisory build 6.14.0-1004.4 USN-7594-1
Ubuntu plucky linux-headers-6.14.0-1007-aws Advisory build 6.14.0-1007.7 USN-7594-3
Ubuntu plucky linux-headers-6.14.0-1007-aws-64k Advisory build 6.14.0-1007.7 USN-7594-3
Ubuntu plucky linux-headers-6.14.0-1007-azure Advisory build 6.14.0-1007.7 USN-7594-2
Ubuntu plucky linux-headers-6.14.0-1007-oracle Advisory build 6.14.0-1007.7 USN-7594-3
Ubuntu plucky linux-headers-6.14.0-1007-oracle-64k Advisory build 6.14.0-1007.7 USN-7594-3
Ubuntu plucky linux-headers-6.14.0-1007-raspi Advisory build 6.14.0-1007.7 USN-7594-1
Ubuntu plucky linux-headers-6.14.0-1008-gcp Advisory build 6.14.0-1008.8 USN-7594-1
Ubuntu plucky linux-headers-6.14.0-1008-gcp-64k Advisory build 6.14.0-1008.8 USN-7594-1
Ubuntu plucky linux-headers-6.14.0-22 Advisory build 6.14.0-22.22 USN-7594-1
Ubuntu plucky linux-headers-6.14.0-22-generic Advisory build 6.14.0-22.22 USN-7594-1
Ubuntu plucky linux-headers-6.14.0-22-generic-64k Advisory build 6.14.0-22.22 USN-7594-1
Ubuntu plucky linux-image-6.14.0-1007-raspi Advisory build 6.14.0-1007.7 USN-7594-1
Ubuntu plucky linux-image-6.14.0-22-generic Advisory build 6.14.0-22.22 USN-7594-1
Ubuntu plucky linux-image-unsigned-6.14.0-1004-realtime Advisory build 6.14.0-1004.4 USN-7594-1
Ubuntu plucky linux-image-unsigned-6.14.0-1007-aws Advisory build 6.14.0-1007.7 USN-7594-3
Ubuntu plucky linux-image-unsigned-6.14.0-1007-aws-64k Advisory build 6.14.0-1007.7 USN-7594-3
Ubuntu plucky linux-image-unsigned-6.14.0-1007-azure Advisory build 6.14.0-1007.7 USN-7594-2
Ubuntu plucky linux-image-unsigned-6.14.0-1007-oracle Advisory build 6.14.0-1007.7 USN-7594-3
Ubuntu plucky linux-image-unsigned-6.14.0-1007-oracle-64k Advisory build 6.14.0-1007.7 USN-7594-3
Ubuntu plucky linux-image-unsigned-6.14.0-1008-gcp Advisory build 6.14.0-1008.8 USN-7594-1
Ubuntu plucky linux-image-unsigned-6.14.0-1008-gcp-64k Advisory build 6.14.0-1008.8 USN-7594-1
Ubuntu plucky linux-image-unsigned-6.14.0-22-generic Advisory build 6.14.0-22.22 USN-7594-1
Ubuntu plucky linux-image-unsigned-6.14.0-22-generic-64k Advisory build 6.14.0-22.22 USN-7594-1
Ubuntu plucky linux-lib-rust-6.14.0-22-generic Advisory build 6.14.0-22.22 USN-7594-1
Ubuntu plucky linux-libc-dev Advisory build 6.14.0-22.22 USN-7594-1
Ubuntu plucky linux-modules-6.14.0-1004-realtime Advisory build 6.14.0-1004.4 USN-7594-1
Ubuntu plucky linux-modules-6.14.0-1007-aws Advisory build 6.14.0-1007.7 USN-7594-3
Ubuntu plucky linux-modules-6.14.0-1007-aws-64k Advisory build 6.14.0-1007.7 USN-7594-3
Ubuntu plucky linux-modules-6.14.0-1007-azure Advisory build 6.14.0-1007.7 USN-7594-2
Ubuntu plucky linux-modules-6.14.0-1007-oracle Advisory build 6.14.0-1007.7 USN-7594-3
Ubuntu plucky linux-modules-6.14.0-1007-oracle-64k Advisory build 6.14.0-1007.7 USN-7594-3
Ubuntu plucky linux-modules-6.14.0-1007-raspi Advisory build 6.14.0-1007.7 USN-7594-1
Ubuntu plucky linux-modules-6.14.0-1008-gcp Advisory build 6.14.0-1008.8 USN-7594-1
Ubuntu plucky linux-modules-6.14.0-1008-gcp-64k Advisory build 6.14.0-1008.8 USN-7594-1
Ubuntu plucky linux-modules-6.14.0-22-generic Advisory build 6.14.0-22.22 USN-7594-1
Ubuntu plucky linux-modules-6.14.0-22-generic-64k Advisory build 6.14.0-22.22 USN-7594-1
Ubuntu plucky linux-modules-extra-6.14.0-1004-realtime Advisory build 6.14.0-1004.4 USN-7594-1
Ubuntu plucky linux-modules-extra-6.14.0-1007-aws Advisory build 6.14.0-1007.7 USN-7594-3
Ubuntu plucky linux-modules-extra-6.14.0-1007-aws-64k Advisory build 6.14.0-1007.7 USN-7594-3
Ubuntu plucky linux-modules-extra-6.14.0-1007-azure Advisory build 6.14.0-1007.7 USN-7594-2
Ubuntu plucky linux-modules-extra-6.14.0-1007-oracle Advisory build 6.14.0-1007.7 USN-7594-3
Ubuntu plucky linux-modules-extra-6.14.0-1007-oracle-64k Advisory build 6.14.0-1007.7 USN-7594-3
Ubuntu plucky linux-modules-extra-6.14.0-1008-gcp Advisory build 6.14.0-1008.8 USN-7594-1
Ubuntu plucky linux-modules-extra-6.14.0-1008-gcp-64k Advisory build 6.14.0-1008.8 USN-7594-1
Ubuntu plucky linux-modules-extra-6.14.0-22-generic Advisory build 6.14.0-22.22 USN-7594-1
Ubuntu plucky linux-modules-ipu6-6.14.0-22-generic Advisory build 6.14.0-22.22 USN-7594-1
Ubuntu plucky linux-modules-ipu7-6.14.0-22-generic Advisory build 6.14.0-22.22 USN-7594-1
Ubuntu plucky linux-modules-iwlwifi-6.14.0-1004-realtime Advisory build 6.14.0-1004.4 USN-7594-1
Ubuntu plucky linux-modules-iwlwifi-6.14.0-22-generic Advisory build 6.14.0-22.22 USN-7594-1
Ubuntu plucky linux-modules-usbio-6.14.0-22-generic Advisory build 6.14.0-22.22 USN-7594-1
Ubuntu plucky linux-modules-vision-6.14.0-22-generic Advisory build 6.14.0-22.22 USN-7594-1
Ubuntu plucky linux-oracle Advisory build 6.14.0-1007.7 USN-7594-3
Ubuntu plucky linux-oracle-headers-6.14.0-1007 Advisory build 6.14.0-1007.7 USN-7594-3
Ubuntu plucky linux-oracle-tools-6.14.0-1007 Advisory build 6.14.0-1007.7 USN-7594-3
Ubuntu plucky linux-perf Advisory build 6.14.0-22.22 USN-7594-1
Ubuntu plucky linux-raspi Advisory build 6.14.0-1007.7 USN-7594-1
Ubuntu plucky linux-raspi-headers-6.14.0-1007 Advisory build 6.14.0-1007.7 USN-7594-1
Ubuntu plucky linux-raspi-tools-6.14.0-1007 Advisory build 6.14.0-1007.7 USN-7594-1
Ubuntu plucky linux-realtime Advisory build 6.14.0-1004.4 USN-7594-1
Ubuntu plucky linux-realtime-cloud-tools-6.14.0-1004 Advisory build 6.14.0-1004.4 USN-7594-1
Ubuntu plucky linux-realtime-headers-6.14.0-1004 Advisory build 6.14.0-1004.4 USN-7594-1
Ubuntu plucky linux-realtime-tools-6.14.0-1004 Advisory build 6.14.0-1004.4 USN-7594-1
Ubuntu plucky linux-source-6.14.0 Advisory build 6.14.0-22.22 USN-7594-1
Ubuntu plucky linux-tools-6.14.0-1004-realtime Advisory build 6.14.0-1004.4 USN-7594-1
Ubuntu plucky linux-tools-6.14.0-1007-aws Advisory build 6.14.0-1007.7 USN-7594-3
Ubuntu plucky linux-tools-6.14.0-1007-aws-64k Advisory build 6.14.0-1007.7 USN-7594-3

Package entries are limited to the first 100 builds and 100 linked advisories.

Description

In the Linux kernel, the following vulnerability has been resolved: riscv: fgraph: Fix stack layout to match __arch_ftrace_regs argument of ftrace_return_to_handler Naresh Kamboju reported a "Bad frame pointer" kernel warning while running LTP trace ftrace_stress_test.sh in riscv. We can reproduce the same issue with the following command: ``` $ cd /sys/kernel/debug/tracing $ echo 'f:myprobe do_nanosleep%return args1=$retval' > dynamic_events $ echo 1 > events/fprobes/enable $ echo 1 > tracing_on $ sleep 1 ``` And we can get the following kernel warning: [ 127.692888] ------------[ cut here ]------------ [ 127.693755] Bad frame pointer: expected ff2000000065be50, received ba34c141e9594000 [ 127.693755] from func do_nanosleep return to ffffffff800ccb16 [ 127.698699] WARNING: CPU: 1 PID: 129 at kernel/trace/fgraph.c:755 ftrace_return_to_handler+0x1b2/0x1be [ 127.699894] Modules linked in: [ 127.700908] CPU: 1 UID: 0 PID: 129 Comm: sleep Not tainted 6.14.0-rc3-g0ab191c74642 #32 [ 127.701453] Hardware name: riscv-virtio,qemu (DT) [ 127.701859] epc : ftrace_return_to_handler+0x1b2/0x1be [ 127.702032] ra : ftrace_return_to_handler+0x1b2/0x1be [ 127.702151] epc : ffffffff8013b5e0 ra : ffffffff8013b5e0 sp : ff2000000065bd10 [ 127.702221] gp : ffffffff819c12f8 tp : ff60000080853100 t0 : 6e00000000000000 [ 127.702284] t1 : 0000000000000020 t2 : 6e7566206d6f7266 s0 : ff2000000065bd80 [ 127.702346] s1 : ff60000081262000 a0 : 000000000000007b a1 : ffffffff81894f20 [ 127.702408] a2 : 0000000000000010 a3 : fffffffffffffffe a4 : 0000000000000000 [ 127.702470] a5 : 0000000000000000 a6 : 0000000000000008 a7 : 0000000000000038 [ 127.702530] s2 : ba34c141e9594000 s3 : 0000000000000000 s4 : ff2000000065bdd0 [ 127.702591] s5 : 00007fff8adcf400 s6 : 000055556dc1d8c0 s7 : 0000000000000068 [ 127.702651] s8 : 00007fff8adf5d10 s9 : 000000000000006d s10: 0000000000000001 [ 127.702710] s11: 00005555737377c8 t3 : ffffffff819d899e t4 : ffffffff819d899e [ 127.702769] t5 : ffffffff819d89a0 t6 : ff2000000065bb18 [ 127.702826] status: 0000000200000120 badaddr: 0000000000000000 cause: 0000000000000003 [ 127.703292] [<ffffffff8013b5e0>] ftrace_return_to_handler+0x1b2/0x1be [ 127.703760] [<ffffffff80017bce>] return_to_handler+0x16/0x26 [ 127.704009] [<ffffffff80017bb8>] return_to_handler+0x0/0x26 [ 127.704057] [<ffffffff800d3352>] common_nsleep+0x42/0x54 [ 127.704117] [<ffffffff800d44a2>] __riscv_sys_clock_nanosleep+0xba/0x10a [ 127.704176] [<ffffffff80901c56>] do_trap_ecall_u+0x188/0x218 [ 127.704295] [<ffffffff8090cc3e>] handle_exception+0x14a/0x156 [ 127.705436] ---[ end trace 0000000000000000 ]--- The reason is that the stack layout for constructing argument for the ftrace_return_to_handler in the return_to_handler does not match the __arch_ftrace_regs structure of riscv, leading to unexpected results.

en · Linux · cna

Vendor advisories explicitly linked to this CVE.

4

Assessment

CVSS risk assessment and additional context for this vulnerability.

CVSS version
3.1
Base score
7.8 / 10
Severity
high
Provider
Linux · cna
Vector string
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Scenarios
en: AV:L - The vulnerable trampoline is armed only by writing to tracefs (`current_tracer`, `dynamic_events`, `events/*/enable`) and fires on ordinary syscall execution, both of which require local access to the machine. There is no network-facing consumer of `arch/riscv/kernel/mcount.S`. AC:L - The mismatch is a fixed compile-time stack layout error, not a race or a memory-layout gamble: the very first return of any traced function reads `s0` from `sp+24` instead of `sp+64` and writes `a0`/`a1` past the 80-byte frame, so the commit's four-command reproducer fails deterministically on the first `sleep 1`. PR:L - Reaching the trampoline requires only write access to tracefs, which is enforced by file permissions rather than any `capable()` check and is routinely delegated to an unprivileged tracing group via tracefs's `gid=` mount option (as Android and ChromeOS do for `atrace`). A non-root member of that group can arm `function_graph` or an fprobe and trigger the corruption. UI:N - The same local user both arms the tracer and triggers it by making any traced function return in their own process; no action by an administrator or other victim is needed. S:U - The out-of-bounds writes and reads all land in the kernel stack of the running task, within the kernel's own security authority — no VM, IOMMU, or sandbox boundary is crossed. C:H - The C side treats `sp..sp+103` as `__arch_ftrace_regs` while only 80 bytes were allocated, so `a5`/`a6`/`a7` and the 64-byte `ftrace_partial_regs()` `memcpy` read 24 bytes past the frame into the caller's live stack, and `s0`/`t1`/`a0`–`a4` are read from uninitialized stack — these stale kernel stack values (pointers, saved registers) are handed to fprobe/BPF callbacks as `$retval`/`$argN` and dumped into the trace buffer and the WARN register dump. I:H - `REG_S a0, 80(sp)` / `REG_S a1, 88(sp)` after `addi sp, sp, -80` is an unconditional 16-byte out-of-bounds stack write into the live frame of the traced function's caller, with `a0` holding an often user-influenceable return value; the same overhang lets a retfunc callback's writes to `args[5..7]` corrupt the caller's frame and even substitute the value `RESTORE_RET_ABI_STATE` reloads into `a0`, giving control over saved state and potentially return addresses further up the stack. A:H - With `HAVE_FUNCTION_GRAPH_FP_TEST` — effectively always enabled on riscv given `ARCH_WANT_FRAME_POINTERS` and `select FRAME_POINTER if PERF_EVENTS` — the garbage frame pointer makes `ftrace_pop_return_trace()` set `*ret = (unsigned long)panic`, so `return_to_handler`'s `jalr a2` jumps directly into `panic()`, in addition to the WARN and `ftrace_graph_stop()` seen in the reported LTP failure.

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
Linux Linux 33d4e904e24d14ff0fbc528b657ddc7c7b636e6a to < 7ed384db061a264bd806898f7ccab9b98b591488 (affected · git)a3ed4157b7d89800a0008de0c9e46a438a5c3745 to < 78b39c587b8f6c69140177108f9c08a75b1c7c37 (affected · git)a3ed4157b7d89800a0008de0c9e46a438a5c3745 to < 67a5ba8f742f247bc83e46dd2313c142b1383276 (affected · git)6.12.75 to < 6.12.92 (affected · semver)Default: unaffected Linux · cna
Linux Linux 6.14 (affected)0 to < 6.14 (unaffected · semver)6.12.92 through 6.12.* (unaffected · semver)6.14.2 through 6.14.* (unaffected · semver)6.15 and later (unaffected · original_commit_for_fix)Default: affected Linux · cna

Weaknesses

0

No weakness assertions.

References

3

Provider assertions

1

Linux · cna

riscv: fgraph: Fix stack layout to match __arch_ftrace_regs argument of ftrace_return_to_handler

Provenance

Schema
5.2
Searchable
yes
Content hash
1a464ac24326510128d41bea35c0e36f109d4a0c7d3fe6e1953e1bfc4435cb87
Ingested
23 Sep 2026, 08:40:04 UTC
Source record
Official CVE record

Search filters

Match options apply to free text. CVE words match tokens; use contains:"…" for literal substrings.

Text

Words and phrases
buffer overflow "remote code execution"
Word prefix
auth*
Literal substring (title or description)
contains:"use-after-free"
Exclude a term or filter
-test -vendor:example

Affected product

Vendor
vendor:Example
Product
product:"Demo Widget"

Severity and score

Severity · none, low, medium, high, critical, unknown
severity:critical
CWE identifier
cwe:CWE-863
CVSS score (0–10)
cvss:>=7.0

Dates and status

Published date · comparisons, relative days
published:>=2026-01-01
Updated date · comparisons, relative days
updated:<30d
Status · published (default), rejected, unknown
status:rejected