From patchwork Mon Feb 25 12:40:07 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Harkin X-Patchwork-Id: 2181021 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id A9120DF230 for ; Mon, 25 Feb 2013 12:43:55 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U9xMF-0001Zl-8y; Mon, 25 Feb 2013 12:40:39 +0000 Received: from mail-we0-x234.google.com ([2a00:1450:400c:c03::234]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1U9xMB-0001Yo-AU for linux-arm-kernel@lists.infradead.org; Mon, 25 Feb 2013 12:40:35 +0000 Received: by mail-we0-f180.google.com with SMTP id k14so2387965wer.11 for ; Mon, 25 Feb 2013 04:40:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:subject:date:message-id:x-mailer :x-gm-message-state; bh=SFxI5FprZ47nODNqfJRVDiZzeMUZi5OoKwJQUqSgPWU=; b=ALFhzbBrPzXVfsYYpDIRj7/h0Ev9VilabDbm/6yy3KfxqCLPsKuDp+hsZeTz4lWqc0 v2BklvPOwVuguY6ru+Ii3XjxvmcHCRZ5WK0SUnVkiYBT1l8YH5KeILYUkxoexfr7CLIn fRADtfaM/p5vP2CgLjvajG9zeIo6LeNyxTNg9Xhm49P+ZTarHVkM0SwxlDfbhyaNU3eG wN0oYChcvwX85yYnw7CsDdNAf6Kn+hyk6nHW5c9Ibz2vckeunRnMU+tq5dHPej/tVlc/ zf+JbBDQdUFOXDk0dcfPKe4L9zz/srr+7m2Jz3Qqde7tSkMwijGhzjejbI01PHMEhteM g0og== X-Received: by 10.194.242.163 with SMTP id wr3mr2034699wjc.35.1361796027134; Mon, 25 Feb 2013 04:40:27 -0800 (PST) Received: from qpc.config (46-65-80-248.zone16.bethere.co.uk. [46.65.80.248]) by mx.google.com with ESMTPS id o8sm14663746wix.7.2013.02.25.04.40.26 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 25 Feb 2013 04:40:26 -0800 (PST) From: Ryan Harkin To: linux-arm-kernel@lists.infradead.org, Catalin Marinas , Will Deacon , Tixy , patches@linaro.org Subject: [PATCH] arm64: compat_sys_sigsuspend: init local blocked mask not current process mask Date: Mon, 25 Feb 2013 12:40:07 +0000 Message-Id: <1361796007-20143-1-git-send-email-ryan.harkin@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Gm-Message-State: ALoCoQk528oH4+/thY5rm+Lyd+71TruXkFCySgy2EoiQ4BiVmjRTB+isXeQsVPFKGXZ6Tj3NOR23 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130225_074035_485486_E352CED4 X-CRM114-Status: UNSURE ( 9.50 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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 --- arch/arm64/kernel/signal32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kernel/signal32.c b/arch/arm64/kernel/signal32.c index a4db3d2..0bc9461 100644 --- a/arch/arm64/kernel/signal32.c +++ b/arch/arm64/kernel/signal32.c @@ -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); }