From patchwork Thu Feb 16 00:36:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kees Cook X-Patchwork-Id: 9576097 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 12597600C5 for ; Thu, 16 Feb 2017 00:36:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 058012857B for ; Thu, 16 Feb 2017 00:36:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EE48828581; Thu, 16 Feb 2017 00:36:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by mail.wl.linuxfoundation.org (Postfix) with SMTP id 4190D2857B for ; Thu, 16 Feb 2017 00:36:35 +0000 (UTC) Received: (qmail 11483 invoked by uid 550); 16 Feb 2017 00:36:33 -0000 Mailing-List: contact kernel-hardening-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Delivered-To: mailing list kernel-hardening@lists.openwall.com Received: (qmail 11442 invoked from network); 16 Feb 2017 00:36:32 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=H0zaLApBsvTp+JDo+drsoPtoDCQIzvfos1QdVyo8VM4=; b=B/rNfmAxldFqD/F4gELTBbdwU6rGdYwi7Uh2x5kJ7nY2rqtzvuQ8AUiAiZo6zo9Je+ rUKkS6DzVsXKMgNRqyMKUZb0IdOqeSTqPaDLkrISmK5WsSY79DxftU6QKyJKeHfuclne 4ZTxhZwre2mMRIM0UgT8ukWwbR7+mbL2RP4vE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=H0zaLApBsvTp+JDo+drsoPtoDCQIzvfos1QdVyo8VM4=; b=X95Km0x7pLbOmGMy54HxtSnrMc9SJLYP9o6ZszqvgRVKvJgBchqapVk2ndAb9ovmgk KWYZzf3vLuChrWx1fhvuYESFAVpTtGP3zPyo//Ub+OqPdaYtuWiSJ++Qh+pD47c2Dafb 1IRT+2q3N+I7k4Ff+W9AVVJ4etgT/dPwPWaUX5oOJnwibZiBBndmvHS0Rnvp/Q7XVz8h bUvF6BBaYTjY8itqT619QbDoXIqCipVfdRz015Jebdnxcy9p4YvXKZi7BUEjPmPqiaCm CWuzAHgqy3rQIF8ovoY7KLVfEPcfE6ykqzVJ3jSLtIAaQj7wiSVX62C9ZaELxfpUi9tW veMg== X-Gm-Message-State: AMke39nUiuVJ2oZ3hU41gTk9QGZ3WSldmys8GSFJBGbDLVFI7sMKRpY4jW8R8xltQ7YMdZyX X-Received: by 10.99.140.77 with SMTP id q13mr42069630pgn.179.1487205380331; Wed, 15 Feb 2017 16:36:20 -0800 (PST) Date: Wed, 15 Feb 2017 16:36:19 -0800 From: Kees Cook To: Russell King Cc: Hoeun Ryu , Al Viro , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-hardening@lists.openwall.com Message-ID: <20170216003619.GA142955@beast> MIME-Version: 1.0 Content-Disposition: inline Subject: [kernel-hardening] [PATCH] ARM: uaccess: fix zeroing of 64-bit get_user() X-Virus-Scanned: ClamAV using ClamSMTP The 64-bit get_user() wasn't clearing the high word due to a typo in the error handler. The exception handler entry was already correct, though. Noticed during recent usercopy test additions in lib/test_user_copy.c. Signed-off-by: Kees Cook --- arch/arm/lib/getuser.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/lib/getuser.S b/arch/arm/lib/getuser.S index 8ecfd15c3a02..df73914e81c8 100644 --- a/arch/arm/lib/getuser.S +++ b/arch/arm/lib/getuser.S @@ -67,7 +67,7 @@ ENTRY(__get_user_4) ENDPROC(__get_user_4) ENTRY(__get_user_8) - check_uaccess r0, 8, r1, r2, __get_user_bad + check_uaccess r0, 8, r1, r2, __get_user_bad8 #ifdef CONFIG_THUMB2_KERNEL 5: TUSER(ldr) r2, [r0] 6: TUSER(ldr) r3, [r0, #4]