]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
x86/ia32: don't save registers on audit call
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tue, 9 Jan 2018 04:09:53 +0000 (23:09 -0500)
committerKirtikar Kashyap <kirtikar.kashyap@oracle.com>
Fri, 12 Jan 2018 18:25:28 +0000 (10:25 -0800)
This is a followup on (x86/ia32: save and clear registers on syscall.)
where we would save the registers at the start of the system call
and also clear them (r8->15). But the ptrace syscall would do
the same thing (save) which meant we would end up over-writting them
with zeros.

Orabug: 27344012
CVE:CVE-2017-5715

Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
Signed-off-by: Kirtikar Kashyap <kirtikar.kashyap@oracle.com>
arch/x86/ia32/ia32entry.S

index 36d3ec7e4cdc7913dc6828932ba3a03ce7f50025..7b268913340f3389decae711513a0cbd12bf7f50 100644 (file)
@@ -313,7 +313,6 @@ sysenter_tracesys:
        testl   $(_TIF_WORK_SYSCALL_ENTRY & ~_TIF_SYSCALL_AUDIT), ASM_THREAD_INFO(TI_flags, %rsp, SIZEOF_PTREGS)
        jz      sysenter_auditsys
 #endif
-       SAVE_EXTRA_REGS
        CLEAR_RREGS
        movq    $-ENOSYS,RAX(%rsp)/* ptrace can change this for a bad syscall */
        movq    %rsp,%rdi        /* &pt_regs -> arg1 */