summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2009-02-27 19:03:24 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2009-03-16 17:52:59 -0700
commit7e81fc96ffa21e3c65448e610d84348d5924d835 (patch)
treee28bdbfba53c07ac2e3e55eca095391843f2b526 /arch
parent47f5f3195be6fcaba3646c68b84704634f241d46 (diff)
x86-64: syscall-audit: fix 32/64 syscall hole
commit ccbe495caa5e604b04d5a31d7459a6f6a76a756c upstream. On x86-64, a 32-bit process (TIF_IA32) can switch to 64-bit mode with ljmp, and then use the "syscall" instruction to make a 64-bit system call. A 64-bit process make a 32-bit system call with int $0x80. In both these cases, audit_syscall_entry() will use the wrong system call number table and the wrong system call argument registers. This could be used to circumvent a syscall audit configuration that filters based on the syscall numbers or argument details. Signed-off-by: Roland McGrath <roland@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/ptrace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c
index e37dccce85db..12fe58938c66 100644
--- a/arch/x86/kernel/ptrace.c
+++ b/arch/x86/kernel/ptrace.c
@@ -1403,7 +1403,7 @@ static void syscall_trace(struct pt_regs *regs)
#ifdef CONFIG_X86_32
# define IS_IA32 1
#elif defined CONFIG_IA32_EMULATION
-# define IS_IA32 test_thread_flag(TIF_IA32)
+# define IS_IA32 is_compat_task()
#else
# define IS_IA32 0
#endif