From patchwork Tue Mar 6 11:22:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jinbum Park X-Patchwork-Id: 10261441 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 82846602C8 for ; Tue, 6 Mar 2018 11:23:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7353328F0D for ; Tue, 6 Mar 2018 11:23:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 67F4628F0E; Tue, 6 Mar 2018 11:23:11 +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.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_MED 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 D3E7A28F05 for ; Tue, 6 Mar 2018 11:23:09 +0000 (UTC) Received: (qmail 15679 invoked by uid 550); 6 Mar 2018 11:23:03 -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 15634 invoked from network); 6 Mar 2018 11:23:02 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=PB5p/v89tu0o4I175OEjSoX/f0w7bSlM0/LZNjgFgEU=; b=MWxx6H13FD3o1jtVTKeO1ckDk3VtxqM5enbRsPQwYI38A3LsqKIBXwfhiQ80sFlemM biHYEbwiprqxOF07Y8KermQWGoKPS2cT7tKe8OEPlNm0XDRuxVCflGzd2bQ4iB/JbN9R SFjBu7hpSpZAoj+ok9dwyOSmIO9WgL3aEIDdPPnhQZpL4jZojyqEeaADzb+KFJX1BQJc Y4X6Vd1biCqt5AtdlgvfCW7QuC2uewBFJK38ofyz+yG7uQpSxOcxQyJBQH1MbC35S8iV ln5yNDM9URc7WvZGLYiCsAVerCSdUJB5d6F5FCQPUIDMMgzkSoFXM/WvJ1SiUtFd/ETG R/Wg== 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:user-agent; bh=PB5p/v89tu0o4I175OEjSoX/f0w7bSlM0/LZNjgFgEU=; b=krfoaLGLUOqwf1Hm1Z4zUMxbvhjHkoqff89TqF+2t4UUCmZPwCYP4PDsPx8t+E2+RU +JD1rb+S1efOtThaW8mxqivi+pGT8DU13HkzNkjgHViJhyFsQOgBG5O8sbKRMwY2exbQ ZfccpIYQe7ej61ay0DLgeL5gWDrTqpJUVWn4JhYCQqWlyvOO1FWmMiCj7j45iRmzJtCw PydcJf49m4P1149Ml3t+s7OBRDESs8RjEWjqP3qHXuRarZgDWhh8jZcv+sx9MpI0Dwsl 0W/nvz8YXIma8JSbeUpmP6Yn20pmM3MOU3tp+w6/Vkq/3bN3N2OGjSi8h1/aLR1CovK6 oCKg== X-Gm-Message-State: APf1xPDWLG+4FjoR2y/9O63MozRva+PTJsvnZxModDYaI6d1fbEIQbeN SOqFh0WfE6xMsLUmOU0QWjs= X-Google-Smtp-Source: AG47ELvCghsxxEKKacuPhn1d+vLVHpv2GlcXe8hJqI3CHqevu/GG6Q3XOfqqLGHwccldimPUMfzrSQ== X-Received: by 10.101.77.7 with SMTP id i7mr14885695pgt.330.1520335370308; Tue, 06 Mar 2018 03:22:50 -0800 (PST) Date: Tue, 6 Mar 2018 20:22:41 +0900 From: Jinbum Park To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-hardening@lists.openwall.com Cc: gregkh@linuxfoundation.org, vladimir.murzin@arm.com, keescook@chromium.org, will.deacon@arm.com, mark.rutland@arm.com, catalin.marinas@arm.com Subject: [PATCH] arm: mm: Kconfig: Disable KUSER_HELPERS in ARMv6 or later as default Message-ID: <20180306112241.GA5938@pjb1027-Latitude-E5410> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: ClamAV using ClamSMTP Codes for KUSER_HELPERS can be abused as ROP gadaget, So that It's better to disable that as if possible. Since over ARMv6 has ldrex/strex at user-space, NEED_KUSER_HELPERS is not selected for over ARMv6. But, Even though NEED_KUSER_HELPERS is not selected, current configuration enable KUSER_HELPERS as default. * as-is - Enable KUSER_HELPERS as default even though over ARMv6. - User can disable KUSER_HELPERS. * to-be - Disable KUSER_HELPERS in ARMv6 or later as default. - User can enable KUSER_HELPERS for compatibility. This change removes the unnecessary configuration that has security-risk. Signed-off-by: Jinbum Park --- arch/arm/mm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index 7f14acf..40e5fe5 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig @@ -840,7 +840,7 @@ config NEED_KUSER_HELPERS config KUSER_HELPERS bool "Enable kuser helpers in vector page" if !NEED_KUSER_HELPERS depends on MMU - default y + default y if NEED_KUSER_HELPERS help Warning: disabling this option may break user programs.