Message ID | 20241205121655.1824269-1-mark.rutland@arm.com (mailing list archive) |
---|---|
Headers | show |
Series | arm64: ptrace: fix handling of partial SETREGSET calls | expand |
On Thu, Dec 05, 2024 at 12:16:51PM +0000, Mark Rutland wrote: > A few of arm64's regsets forget to handle partial-length SETREGSET > calls, and copy a small portion of uninitialized kernel stack memory to > the backing storage of the relevant registers. In all cases the read is > limited to a specific slot on the stack, and the issue does not provide > a write mechanism. It feels like we might want a helpers specifically for the case where we're mapping a value directly into a data structure, it all feels a bit open coding. The shape is a bit awkward though since things aren't usually stored in the same layout as we expose via ptrace when there's more than one value. Reviewed-by: Mark Brown <broonie@kernel.org>
On Thu, 05 Dec 2024 12:16:51 +0000, Mark Rutland wrote: > A few of arm64's regsets forget to handle partial-length SETREGSET > calls, and copy a small portion of uninitialized kernel stack memory to > the backing storage of the relevant registers. In all cases the read is > limited to a specific slot on the stack, and the issue does not provide > a write mechanism. > > For example, a zero-length SETREGSET to NT_ARM_FPMR will reset FPMR to > an arbitrary uninitialized value from the kernel stack: > > [...] Applied to arm64 (for-next/fixes), thanks! [1/4] arm64: ptrace: fix partial SETREGSET for NT_ARM_TAGGED_ADDR_CTRL https://git.kernel.org/arm64/c/ca62d90085f4 [2/4] arm64: ptrace: fix partial SETREGSET for NT_ARM_FPMR https://git.kernel.org/arm64/c/f5d71291841a [3/4] arm64: ptrace: fix partial SETREGSET for NT_ARM_POE https://git.kernel.org/arm64/c/594bfc4947c4 [4/4] arm64: ptrace: fix partial SETREGSET for NT_ARM_GCS https://git.kernel.org/arm64/c/d60624f72d15