[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170330095927.904024572@linuxfoundation.org>
Date: Thu, 30 Mar 2017 12:00:29 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Dave Martin <Dave.Martin@....com>,
James Hogan <james.hogan@...tec.com>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: [PATCH 4.10 14/17] metag/ptrace: Reject partial NT_METAG_RPIPE writes
4.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dave Martin <Dave.Martin@....com>
commit 7195ee3120d878259e8d94a5d9f808116f34d5ea upstream.
It's not clear what behaviour is sensible when doing partial write of
NT_METAG_RPIPE, so just don't bother.
This patch assumes that userspace will never rely on a partial SETREGSET
in this case, since it's not clear what should happen anyway.
Signed-off-by: Dave Martin <Dave.Martin@....com>
Acked-by: James Hogan <james.hogan@...tec.com>
Signed-off-by: Linus Torvalds <torvalds@...ux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
arch/metag/kernel/ptrace.c | 2 ++
1 file changed, 2 insertions(+)
--- a/arch/metag/kernel/ptrace.c
+++ b/arch/metag/kernel/ptrace.c
@@ -253,6 +253,8 @@ int metag_rp_state_copyin(struct pt_regs
unsigned long long *ptr;
int ret, i;
+ if (count < 4*13)
+ return -EINVAL;
/* Read the entire pipeline before making any changes */
ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf,
&rp, 0, 4*13);
Powered by blists - more mailing lists