lkml.org 
[lkml]   [2015]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: sys_execve leaking rbp/rbx/r12-15 to the new process?

* Denys Vlasenko <dvlasenk@redhat.com> wrote:

> We can do this instead:
>
> ENTRY(stub_execve)
> CFI_STARTPROC
> call sys_execve
> testl %eax, %eax
> jz 1f
> ret
> 1: addq $8, %rsp
> xorl %ebx, %ebx // maybe create a macro for zeroing these
> xorl %ebp, %ebp //
> xorl %r12d, %r12d //
> xorl %r13d, %r13d //
> xorl %r14d, %r14d //
> xorl %r15d, %r15d //

Yeah, call it ZERO_EXTRA_REGS or so.

> Any reason we should not do this change?

Not that I can see - lets try it.

Thanks,

Ingo


\
 
 \ /
  Last update: 2015-04-04 16:41    [W:0.260 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site