[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1497897167-14556-210-git-send-email-w@1wt.eu>
Date: Mon, 19 Jun 2017 20:31:48 +0200
From: Willy Tarreau <w@....eu>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org,
linux@...ck-us.net
Cc: Dave Martin <Dave.Martin@....com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Willy Tarreau <w@....eu>
Subject: [PATCH 3.10 209/268] metag/ptrace: Reject partial NT_METAG_RPIPE writes
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: Willy Tarreau <w@....eu>
---
arch/metag/kernel/ptrace.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/metag/kernel/ptrace.c b/arch/metag/kernel/ptrace.c
index 2e4dfc1..5e2dc7d 100644
--- a/arch/metag/kernel/ptrace.c
+++ b/arch/metag/kernel/ptrace.c
@@ -253,6 +253,8 @@ int metag_rp_state_copyin(struct pt_regs *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);
--
2.8.0.rc2.1.gbe9624a
Powered by blists - more mailing lists