{"id":"CVE-2026-138870","aliases":["CVE-2026-138870"],"related":[],"kind":"vulnerability","state":"published","title":"riscv: cfi: Bounds check restore token before swap","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nriscv: cfi: Bounds check restore token before swap\n\nCurrently the user-provided shadow stack restore token is not checked\nbefore being used as the address in ssamoswap.d. While an invalid\nrestore token will be caught and raise SIGSEGV, this happens after\nwriting 4 bytes of zeroes anywhere in the address space. Check that the\nrestore token is at least a valid user address before the swap to ensure\nwe do not scribble over kernel memory.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nriscv: cfi: Bounds check restore token before swap\n\nCurrently the user-provided shadow stack restore token is not checked\nbefore being used as the address in ssamoswap.d. While an invalid\nrestore token will be caught and raise SIGSEGV, this happens after\nwriting 4 bytes of zeroes anywhere in the address space. Check that the\nrestore token is at least a valid user address before the swap to ensure\nwe do not scribble over kernel memory.","source":"cvelist"}],"published":"2026-11-30T13:25:45.456Z","modified":"2026-12-01T06:17:29.330Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7,"rating":"HIGH"}],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"66c9c713de597f9b40a319ebda4d3466ce2cdff0","fixed":"34dbcdd0562461805f2fd276593517794b41e487","status":"affected"},{"type":"git","introduced":"66c9c713de597f9b40a319ebda4d3466ce2cdff0","fixed":"df333b72c0e14d6cffec72ce9a00503f12d1e28d","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"7.0","status":"affected"},{"type":"semver","introduced":"0","fixed":"7.0","status":"unaffected"},{"type":"semver","introduced":"7.3.4","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/34dbcdd0562461805f2fd276593517794b41e487","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/df333b72c0e14d6cffec72ce9a00503f12d1e28d","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-138870","url":"https://www.cve.org/CVERecord?id=CVE-2026-138870","licence":"CVE Terms of Use","modified":"2026-12-01T05:40:23.530Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-138870","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-138870","licence":"Public domain","modified":"2026-12-01T06:17:29.330Z"}],"updatedAt":"2026-12-01T06:32:14.403Z","epss":{"score":0.00147,"percentile":0.04152,"date":"2026-12-01T12:00:22.000Z"}}