Skip to contentSkip to conversation

arm64: compat_sys_sigsuspend: init local blocked mask not current process mask

PATCH New Ryan Harkin 2 participants 2 messages Feb 25, 2013 arm64

lore
Share & tools
lore
#0 lore raw

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
index a4db3d2..0bc9461 100644
@@ -347,7 +347,7 @@ asmlinkage int compat_sys_sigsuspend(int restart, compat_ulong_t oldmask,
 {
 	sigset_t blocked;
 
-	siginitset(&current->blocked, mask);
+	siginitset(&blocked, mask);
 	return sigsuspend(&blocked);
 }
 
Signature · 1 line
1.7.9.5
maintainer
#1 lore raw

PATCH 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.

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