PT-2026-64350 · Linux · Linux
CVE-2026-64235
·
Published
2026-07-24
·
Updated
2026-07-24
None
No severity ratings or metrics are available. When they are, we'll update the corresponding info on the page.
In the Linux kernel, the following vulnerability has been resolved:
x86/ftrace: Relocate %rip-relative percpu refs in dynamic trampolines
With CONFIG CALL DEPTH TRACKING enabled on an x86 retbleed-affected platform
(eg: Skylake), with retbleed=stuff, registering a dynamic ftrace trampoline
crashes on the first call into the traced function:
BUG: unable to handle page fault for address: ffff88817ae18880
#PF: supervisor write access in kernel mode
#PF: error code(0x0002) - not-present page
PGD 4b53067 P4D 4b53067 PUD 0
Oops: Oops: 0002 [#1] SMP PTI
CPU: 3 UID: 0 PID: 187 Comm: usleep Not tainted 7.0.10 #243 PREEMPT(full)
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Arch Linux 1.17.0-2-2 04/01/2014
Code: 24 78 00 00 00 00 48 89 ea 48 89 54 24 20 48 8b b4 24 b8 00 00 00 48 8b bc 24 b0 00 00 00 48 89 bc 24 80 00 00 00 48 83 ef 05 <65> 48 c1 3d 1f a8 b6 02 05 48 8b 15 f6 00 00 00 4c 89 3c 24 4c 89
Call Trace:
? find held lock
? exc page fault
? lock release
? x64 sys clock nanosleep
? lockdep hardirqs on prepare
? trace hardirqs on
x64 sys clock nanosleep
do syscall 64
? exc page fault
? call depth return thunk
entry SYSCALL 64 after hwframe
...
Kernel panic - not syncing: Fatal exception
This small reproducer allows to easily trigger the crash:
echo 'p x64 sys clock nanosleep' > /sys/kernel/tracing/kprobe events
echo 1 > /sys/kernel/tracing/events/kprobes/p x64 sys clock nanosleep 0/enable
usleep 1
Monitoring the crash under GDB points to the exact instruction in charge of
incrementing the call depth:
sarq $5, %gs: x86 call depth(%rip)
This instruction matches the one inserted by the ftrace regs caller from
ftrace 64.S. This emitted code was likely working fine until the introduction
of
59bec00ace28 ("x86/percpu: Introduce %rip-relative addressing to PER CPU VAR()"):
it has made the call depth accounting addressing relative to $rip, instead of
being based on an absolute address.
As this code exact location depends on where the trampoline lives in memory,
the corresponding displacement needs to be adjusted at runtime to actually
correctly find the per-cpu x86 call depth value, otherwise the targeted
address is wrong, leading to the page fault seen above.
Fix the %rip-relative displacement of the copied CALL DEPTH ACCOUNT
instruction (from ftrace regs caller) by calling text poke apply relocation(),
as it is done for example by the x86 BPF JIT compiler through
x86 call depth emit accounting(). This corrects both CALL DEPTH ACCOUNT slots,
in ftrace caller and ftrace regs caller.
[ bp: Massage. ]
Found an issue in the description? Have something to add? Feel free to write us 👾
Related Identifiers
Affected Products
Linux