]> git.baikalelectronics.ru Git - kernel.git/commit
x86-64: syscall-audit: fix 32/64 syscall hole
authorRoland McGrath <roland@redhat.com>
Sat, 28 Feb 2009 03:03:24 +0000 (19:03 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 2 Mar 2009 23:41:30 +0000 (15:41 -0800)
commitc35307dd9a2d69743949208968f0f395b8d685f8
tree9fea231e87d57869e4f6ecbbdb0cbd4a51bb6873
parent80536243c06896115c2a1bd34a76e4c8f35c560e
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>
arch/x86/kernel/ptrace.c