• A
    m68k: Fix stack mangling logics in sigreturn · ea52b58c
    Al Viro 提交于
    a) we should hold modifying regs->format until we know we *will* be
    doing stack expansion; otherwise attacker can modify sigframe to
    have wrong ->sc_formatvec and install SIGSEGV handler.
    
    b) we should *not* mix copying saved extra stuff from userland with
    expanding the stack; once we'd done that manual memmove, we'd better
    not return to C, so cleanup is very hard to do.  The easiest way
    is to copy it on stack first, making sure we won't overwrite on stack
    expansion.  Fortunately that's easy to do...
    Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
    Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
    ea52b58c
signal.c 26.5 KB