ptrace: Prevent kernel-infoleak in ptrace_get_syscall_info()
stable inclusion from stable-5.10.2 commit d3f4117b0275b2fb2de3a034fe1060a80104833f bugzilla: 46859 -------------------------------- commit 0032ce0f upstream. ptrace_get_syscall_info() is potentially copying uninitialized stack memory to userspace, since the compiler may leave a 3-byte hole near the beginning of `info`. Fix it by adding a padding field to `struct ptrace_syscall_info`. Fixes: 201766a2 ("ptrace: add PTRACE_GET_SYSCALL_INFO request") Suggested-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NPeilin Ye <yepeilin.cs@gmail.com> Reviewed-by: NDmitry V. Levin <ldv@altlinux.org> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200801152044.230416-1-yepeilin.cs@gmail.comSigned-off-by: NChristian Brauner <christian.brauner@ubuntu.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com>
Showing
想要评论请 注册 或 登录