This is a note to let you know that I've just added the patch titled ptrace: Prevent kernel-infoleak in ptrace_get_syscall_info() to the 5.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: ptrace-prevent-kernel-infoleak-in-ptrace_get_syscall_info.patch and it can be found in the queue-5.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 0032ce0f85a269a006e91277be5fdbc05fad8426 Mon Sep 17 00:00:00 2001 From: Peilin Ye <yepeilin.cs@xxxxxxxxx> Date: Sat, 1 Aug 2020 11:20:44 -0400 Subject: ptrace: Prevent kernel-infoleak in ptrace_get_syscall_info() From: Peilin Ye <yepeilin.cs@xxxxxxxxx> commit 0032ce0f85a269a006e91277be5fdbc05fad8426 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: 201766a20e30 ("ptrace: add PTRACE_GET_SYSCALL_INFO request") Suggested-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Signed-off-by: Peilin Ye <yepeilin.cs@xxxxxxxxx> Reviewed-by: Dmitry V. Levin <ldv@xxxxxxxxxxxx> Cc: stable@xxxxxxxxxxxxxxx Link: https://lore.kernel.org/r/20200801152044.230416-1-yepeilin.cs@xxxxxxxxx Signed-off-by: Christian Brauner <christian.brauner@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- include/uapi/linux/ptrace.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/include/uapi/linux/ptrace.h +++ b/include/uapi/linux/ptrace.h @@ -81,7 +81,8 @@ struct seccomp_metadata { struct ptrace_syscall_info { __u8 op; /* PTRACE_SYSCALL_INFO_* */ - __u32 arch __attribute__((__aligned__(sizeof(__u32)))); + __u8 pad[3]; + __u32 arch; __u64 instruction_pointer; __u64 stack_pointer; union { Patches currently in stable-queue which might be from yepeilin.cs@xxxxxxxxx are queue-5.4/ptrace-prevent-kernel-infoleak-in-ptrace_get_syscall_info.patch