]> git.baikalelectronics.ru Git - kernel.git/commit
s390: fix info leak in do_sigsegv
authorMichal Hocko <mhocko@suse.com>
Mon, 23 May 2016 13:35:51 +0000 (15:35 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 23 May 2016 14:45:25 +0000 (16:45 +0200)
commit3477f6f37680556845b6d1086e2d4d1b58ca07cf
treee2a6d7b9108260e8ab0aa327a129422fb089862d
parenta63505c88bd0600d582f5266ed053a55c94f7bb7
s390: fix info leak in do_sigsegv

Aleksa has reported incorrect si_errno value when stracing task which
received SIGSEGV:
[pid 20799] --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_errno=2510266, si_addr=0x100000000000000}

The reason seems to be that do_sigsegv is not initializing siginfo
structure defined on the stack completely so it will leak 4B of
the previous stack content. Fix it simply by initializing si_errno
to 0 (same as do_sigbus does already).

Cc: stable # introduced pre-git times
Reported-by: Aleksa Sarai <asarai@suse.de>
Signed-off-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/mm/fault.c