CVE-2026-138870: riscv: cfi: Bounds check restore token before swap

Published Nov 30, 2026
·
Updated

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

riscv: cfi: Bounds check restore token before swap

Currently the user-provided shadow stack restore token is not checked before being used as the address in ssamoswap.d. While an invalid restore token will be caught and raise SIGSEGV, this happens after writing 4 bytes of zeroes anywhere in the address space. Check that the restore token is at least a valid user address before the swap to ensure we do not scribble over kernel memory.

Affected Software

1 affected component
Linux Linux kernel

Event History

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

Frequently Asked Questions

1

Who is exposed to this issue?

Systems running the Linux kernel on RISC-V with Control-Flow Integrity shadow-stack restore handling are exposed when user-provided restore tokens can reach the affected swap operation.

2

What does an attacker need to exploit it?

An attacker needs to supply an invalid shadow-stack restore token. Before the fix, the token could be used as an address before validation, causing a four-byte zero write before the resulting fault raises SIGSEGV.

3

What is the impact of a failed restore-token validation?

The invalid token is ultimately detected and causes SIGSEGV, but detection occurs after the kernel has attempted to write four zero bytes at the supplied address. The fix validates that the token is at least a valid user address before the swap, preventing writes to kernel memory.

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