diff options
author | Andi Kleen <ak@suse.de> | 2007-09-21 16:16:18 +0200 |
---|---|---|
committer | Chris Wright <chrisw@sous-sol.org> | 2007-09-21 15:38:11 -0700 |
commit | fc370f287729799250e04cb1d880140d14612bf0 (patch) | |
tree | 2a55fb05375f65a1f4bd6cd31a43c986dca07c9a /arch/x86_64/kernel/ptrace.c | |
parent | 14d33e7fa86a09138b745030097a48c396cf4e57 (diff) |
[PATCH] x86_64: Zero extend all registers after ptrace in 32bit entry path.
Strictly it's only needed for eax.
It actually does a little more than strictly needed -- the other registers
are already zero extended.
Also remove the now unnecessary and non functional compat task check
in ptrace.
This is CVE-2007-4573
Found by Wojciech Purczynski
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Diffstat (limited to 'arch/x86_64/kernel/ptrace.c')
-rw-r--r-- | arch/x86_64/kernel/ptrace.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/arch/x86_64/kernel/ptrace.c b/arch/x86_64/kernel/ptrace.c index 9409117b9f19..8d89d8ce4c8f 100644 --- a/arch/x86_64/kernel/ptrace.c +++ b/arch/x86_64/kernel/ptrace.c @@ -223,10 +223,6 @@ static int putreg(struct task_struct *child, { unsigned long tmp; - /* Some code in the 64bit emulation may not be 64bit clean. - Don't take any chances. */ - if (test_tsk_thread_flag(child, TIF_IA32)) - value &= 0xffffffff; switch (regno) { case offsetof(struct user_regs_struct,fs): if (value && (value & 3) != 3) |