CVE-2026-139619: powerpc/ftrace: Don't restore r13 during ftrace_regs_caller

Published Nov 30, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

powerpc/ftrace: Don't restore r13 during ftraceregscaller

Michal reported a stack-protector failure and subsequent panic when running kernel builds. This was observed with full/lazy preemption. Initially it was suspected as KVM, but later turned out to be due to a bcc tool running in parallel.

Issue was recreated using a bcc tool. For example, running below in parallel leads to crash. ./funccount sched -d 100 and make -j 64

The same crash was observed when running kprobe for schedule() function, while simpler function tracer for schedule() didn't cause the crash. This helped to narrow it down to ftrace backed kprobes area.

The crash occurs as follows:

ftraceregscaller entry on CPU A | +-> save r13 = CPU A PACA into ptregs | +-> call kprobeftracehandler() | +-> ftracetestrecursionunlock() | +-> preemptenable +-> task can schedule and migrate to CPU B +-> task resumes with live r13 = CPU B PACA | +-> RESTGPRS(2, 31) | +-> restore saved r13 = CPU A PACA | |-> The task then continues running on CPU B with r13 pointing | to CPU A's PACA.

The stack-protector canary is accessed through the PACA. After the task migrates, CPU A may run a different task and update its PACA with that task's canary. Restoring the saved r13 then causes the migrated task's saved stack canary to be compared against the canary in CPU A's PACA, resulting in a stack-protector failure.

Similarly, current is resolved through the PACA. With a stale r13, preemptcount() can access the state of the task referenced by CPU A's PACA instead of the task running on CPU B. This results in corrupted preempt-count warnings and scheduling-while-atomic failures.

This path for example is called when using kprobes and parallel kernel builds can cause preemptions during ftracetestrecursionunlock.

Do not restore r13 from the saved register frame. If the task did not migrate, the live r13 already has the saved value. If it migrated, the live r13 contains the correct PACA pointer for the CPU on which the task resumed.

On PPC32, r13 is regular register. So do this fix only for PPC64

Affected Software

1 affected component
Linux Linux kernel

Event History

Nov 30, 2026
CVE Published
via MITRE·01:36 PM
Data Sourced
via MITRE·01:36 PM
Description

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203