diff options
author | Roland McGrath <roland@redhat.com> | 2009-02-27 22:03:24 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-02 18:41:30 -0500 |
commit | ccbe495caa5e604b04d5a31d7459a6f6a76a756c (patch) | |
tree | 9fea231e87d57869e4f6ecbbdb0cbd4a51bb6873 | |
parent | 778ef1e6cbb049c9bcbf405936ee6f2b6e451892 (diff) |
x86-64: syscall-audit: fix 32/64 syscall hole
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>
-rw-r--r-- | arch/x86/kernel/ptrace.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c index 5a4c23d89892..06ca07f6ad86 100644 --- a/arch/x86/kernel/ptrace.c +++ b/arch/x86/kernel/ptrace.c | |||
@@ -1388,7 +1388,7 @@ void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, | |||
1388 | #ifdef CONFIG_X86_32 | 1388 | #ifdef CONFIG_X86_32 |
1389 | # define IS_IA32 1 | 1389 | # define IS_IA32 1 |
1390 | #elif defined CONFIG_IA32_EMULATION | 1390 | #elif defined CONFIG_IA32_EMULATION |
1391 | # define IS_IA32 test_thread_flag(TIF_IA32) | 1391 | # define IS_IA32 is_compat_task() |
1392 | #else | 1392 | #else |
1393 | # define IS_IA32 0 | 1393 | # define IS_IA32 0 |
1394 | #endif | 1394 | #endif |