RISC-V ISA Explorer · Security & CFI

Zicfiss: CFI Shadow Stacks

Ratified 2024-07 · version 1.0.0

Keeps return addresses on a protected shadow stack and checks them on return, blocking stack-smashing ROP.

Typical use: Backward-edge CFI (returns)

Specification

Open Zicfiss in the explorer

Dependencies

Requires

Instructions (7)

MnemonicNameEncodingMatchMask
C.SSPOPCHKCompressed Shadow Stack Pop and Check----------------01100010100000010x62810xffff
C.SSPUSHCompressed Shadow Stack Push----------------01100000100000010x60810xffff
SSAMOSWAP.D01001------------011-----01011110x4800302f0xf800707f
SSAMOSWAP.W01001------------010-----01011110x4800202f0xf800707f
SSPOPCHKShadow Stack Pop and Check110011011100-----1000000011100110xcdc040730xfff07fff
SSPUSHShadow Stack Push1100111-----000001000000011100110xce0040730xfe0fffff
SSRDPRead ssp into a Register11001101110000000100-----11100110xcdc040730xfffff07f

Control and status registers (1)

NameAddressModeDescription
ssp0x11UShadow Stack Pointer