arm64: compat_sys_sigsuspend: init local blocked mask not current process mask
PATCH 1/1 arm64: compat_sys_sigsuspend: init local blocked mask not current process mask
The original version changed the signal mask in the current process, and then passed an unitialized variable to sigsuspend, which in turn, besides the other work, sets current->blocked.
The value of mask, passed from a process, was effectively overwritten by some random value. If the random value was zero, all signals were blocked and pipes no longer work.
--- arch/arm64/kernel/signal32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/kernel/signal32.c +1 -1
@@ -347,7 +347,7 @@ asmlinkage int compat_sys_sigsuspend(int restart, compat_ulong_t oldmask, {sigset_t blocked; -siginitset (¤t->blocked, mask); +siginitset (&blocked, mask);return sigsuspend (&blocked); }
Signature · 1 line
1.7.9.5
Catalin Marinas
maintainerPATCH 1/1 arm64: compat_sys_sigsuspend: init local blocked mask not current process mask
Quoted 9 lines · Ryan Harkin
The original version changed the signal mask in the current process, and then passed an unitialized variable to sigsuspend, which in turn, besides the other work, sets
current->blocked.The value of mask, passed from a process, was effectively overwritten by some random value. If the random value was zero, all signals were blocked and pipes no longer work.
Signed-off-by Ryan Harkin <[email protected]>
Thanks for the patch. It's a candidate for stable since mainline no longer has this function, removed by commit 84b9e9b40 (arm64: switch compat to generic old sigsuspend).
Signature · 1 line
Catalin