Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 199401 Details for
Bug 294541
CVE-2007-4573 x86_64 syscall vulnerability
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Andis proposed patch
1.txt (text/plain), 3.15 KB, created by
Mark J. Cox
on 2007-09-19 10:51:23 UTC
(
hide
)
Description:
Andis proposed patch
Filename:
MIME Type:
Creator:
Mark J. Cox
Created:
2007-09-19 10:51:23 UTC
Size:
3.15 KB
patch
obsolete
>Zero extend eax after ptrace in 32bit entry path. >It actually does a little more than strictly needed -- the other registers are >already zero extended. > >Signed-off-by: Andi Kleen <ak@suse.de> > >Index: linux/arch/x86_64/ia32/ia32entry.S >=================================================================== >--- linux.orig/arch/x86_64/ia32/ia32entry.S >+++ linux/arch/x86_64/ia32/ia32entry.S >@@ -38,6 +38,18 @@ > movq %rax,R8(%rsp) > .endm > >+ .macro LOAD_ARGS32 offset >+ movl \offset(%rsp),%r11d >+ movl \offset+8(%rsp),%r10d >+ movl \offset+16(%rsp),%r9d >+ movl \offset+24(%rsp),%r8d >+ movl \offset+40(%rsp),%ecx >+ movl \offset+48(%rsp),%edx >+ movl \offset+56(%rsp),%esi >+ movl \offset+64(%rsp),%edi >+ movl \offset+72(%rsp),%eax >+ .endm >+ > .macro CFI_STARTPROC32 simple > CFI_STARTPROC \simple > CFI_UNDEFINED r8 >@@ -152,7 +164,7 @@ sysenter_tracesys: > movq $-ENOSYS,RAX(%rsp) /* really needed? */ > movq %rsp,%rdi /* &pt_regs -> arg1 */ > call syscall_trace_enter >- LOAD_ARGS ARGOFFSET /* reload args from stack in case ptrace changed it */ >+ LOAD_ARGS32 ARGOFFSET /* reload args from stack in case ptrace changed it >*/ > RESTORE_REST > movl %ebp, %ebp > /* no need to do an access_ok check here because rbp has been >@@ -255,7 +267,7 @@ cstar_tracesys: > movq $-ENOSYS,RAX(%rsp) /* really needed? */ > movq %rsp,%rdi /* &pt_regs -> arg1 */ > call syscall_trace_enter >- LOAD_ARGS ARGOFFSET /* reload args from stack in case ptrace changed it */ >+ LOAD_ARGS32 ARGOFFSET /* reload args from stack in case ptrace changed it >*/ > RESTORE_REST > movl RSP-ARGOFFSET(%rsp), %r8d > /* no need to do an access_ok check here because r8 has been >@@ -334,7 +346,7 @@ ia32_tracesys: > movq $-ENOSYS,RAX(%rsp) /* really needed? */ > movq %rsp,%rdi /* &pt_regs -> arg1 */ > call syscall_trace_enter >- LOAD_ARGS ARGOFFSET /* reload args from stack in case ptrace changed it */ >+ LOAD_ARGS32 ARGOFFSET /* reload args from stack in case ptrace changed it >*/ > RESTORE_REST > jmp ia32_do_syscall > END(ia32_syscall) >Index: linux/arch/x86_64/kernel/ptrace.c >=================================================================== >--- linux.orig/arch/x86_64/kernel/ptrace.c >+++ linux/arch/x86_64/kernel/ptrace.c >@@ -232,10 +232,6 @@ static int putreg(struct task_struct *ch > { > 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) > > >---------------------------------------------- > >2.4 patch > >Make sure to validate all 64bits of ptrace information > >Signed-off-by: Andi Kleen <ak@suse.de> > >Index: linux-2.4.33/arch/x86_64/ia32/ia32entry.S >=================================================================== >--- linux-2.4.33.orig/arch/x86_64/ia32/ia32entry.S >+++ linux-2.4.33/arch/x86_64/ia32/ia32entry.S >@@ -73,7 +73,7 @@ ia32_tracesys: > call syscall_trace > LOAD_ARGS ARGOFFSET /* reload args from stack in case ptrace changed it */ > RESTORE_REST >- cmpl $(IA32_NR_syscalls),%eax >+ cmpq $(IA32_NR_syscalls),%rax > jae 1f > IA32_ARG_FIXUP > call *ia32_sys_call_table(,%rax,8) > >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 294541
: 199401