{"id":"CVE-2026-98951","summary":"riscv: ptrace: Zero-initialize regset buffers before copyin","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nriscv: ptrace: Zero-initialize regset buffers before copyin\n\nuser_regset_copyin() only copies `count` bytes, so a PTRACE_SETREGSET\nrequest with a short iov_len leaves the rest of the stack buffer\nuninitialized. In riscv_vr_set() that garbage is validated and copied\ninto the target's vstate, and in riscv_cfi_set() it can be stored as\nthe target's shadow stack pointer. Zero both buffers, as the get path\nalready does.","modified":"2026-10-28T02:31:14.087594349Z","published":"2026-10-23T12:19:10.747Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/98xxx/CVE-2026-98951.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/59052a88ba5fe4a7bb34b3a0a42aa5d453d3bb97"},{"type":"WEB","url":"https://git.kernel.org/stable/c/89fc70d73f4ac8781f9e15edd1dbc6b6088453b3"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/98xxx/CVE-2026-98951.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-98951"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"9300f00439743c4a34d735e1a27118eb68a1504e"},{"fixed":"89fc70d73f4ac8781f9e15edd1dbc6b6088453b3"},{"fixed":"59052a88ba5fe4a7bb34b3a0a42aa5d453d3bb97"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"6.5.3"},{"fixed":"6.6"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"f2a9cd050901c4734bc175294c3bd6a40a1a9e99"}]}],"versions":["v6.5.13","v6.5.12","v6.5.11","v6.5.10","v6.5.9","v6.5.8","v6.5.7","v6.5.6","v6.5.5","v6.5.4","v6.5.3"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-98951.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.6.0"},{"fixed":"7.2.11"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-98951.json"}}],"schema_version":"1.9.2"}