summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorSamuel Holland <samuel.holland@sifive.com>2026-10-07 08:57:40 -0700
committerPaul Walmsley <pjw@kernel.org>2026-10-08 14:11:57 -0600
commitdf333b72c0e14d6cffec72ce9a00503f12d1e28d (patch)
tree9b1b5e5975c95f32e4087d4972a6214b0ed20f0e /include/linux
parent2cf0b2992203da6b383e21d8a1756d91ca4bfcfc (diff)
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. Fixes: 66c9c713de59 ("riscv/signal: save and restore the shadow stack on a signal") Signed-off-by: Samuel Holland <samuel.holland@sifive.com> Link: https://patch.msgid.link/20261007155748.291814-1-samuel.holland@sifive.com Cc: stable@vger.kernel.org Signed-off-by: Paul Walmsley <pjw@kernel.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions