From patchwork Fri Dec 1 20:10:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kees Cook X-Patchwork-Id: 10087947 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 6BBEF603B4 for ; Fri, 1 Dec 2017 20:10:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5DDF32A774 for ; Fri, 1 Dec 2017 20:10:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 528022A770; Fri, 1 Dec 2017 20:10:20 +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 7F42E2A55D for ; Fri, 1 Dec 2017 20:10:18 +0000 (UTC) Received: (qmail 23890 invoked by uid 550); 1 Dec 2017 20:10:16 -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 23866 invoked from network); 1 Dec 2017 20:10:16 -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=kIC9usKkx1XNRliSM3jRLV18YzCn9dubH+QfGwrrftw=; b=cxUemOBKtKaGKZhPAxWNbW6C22Et7RyCzl4FFHUSHDFgXeXTQaRWE8RmKmvG2y6GpS mEKe2DGe2Amvi/VkeOLVqGxbD38/XRQq/rCdKQjjOemZ5kQAaT3zlndJZY18xYlzmG39 u6a5NKrfS3E7+XFZz1reIE7miy15krpHGJkEs= 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=kIC9usKkx1XNRliSM3jRLV18YzCn9dubH+QfGwrrftw=; b=WeR5VAm52Dzw28y+gH96YuN4My43f4qUkwHT5ly9BY43s/MRZKLn017DUe+gHYWBu9 oZRzw5K7ov4qZXhxeyumEjMaX1nI9WYw9LKyNtrLppnZN8xZ3m7uKsfQSWSoFcGtw4vz IzycEljF9b2f43qWb7cjb/6+3/POJHG9NmDp9BFPgGgPHWNt0jkMmATty2qcLFw2IH03 cwlAzmPIItuCVZojBYiQUL7Tw+vlDVu2NYsboWnBIZRe+F7aVUOmfIzOpjP8QTvDj2Nh UTf/IFiD/0T+NgCVT6Ih09KTM56PpqTtQ1i0k3DmGcmvVtjx7A6uXMDkbp9TUa3G4HDx HOaw== X-Gm-Message-State: AJaThX5cnDh+1ihptT+yYzAANbOtyhr3zmQgspAGrpkTLR1M83iuzXyc g2lxM7pYCyClvzN8abAKiHbiaw== X-Google-Smtp-Source: AGs4zMa+m71g0zZivtQ67fUMFUP0pS3+dtkAv0fGaoJRE3W66wcp5hwS1fuMjMwx6NNMCug5KU1A9w== X-Received: by 10.99.152.25 with SMTP id q25mr6938356pgd.245.1512159004077; Fri, 01 Dec 2017 12:10:04 -0800 (PST) Date: Fri, 1 Dec 2017 12:10:00 -0800 From: Kees Cook To: Andrew Morton Cc: linux-kernel@vger.kernel.org, kernel-hardening@lists.openwall.com, Mark Rutland , Will Deacon , Laura Abbott , x86@kernel.org Message-ID: <20171201201000.GA44539@beast> MIME-Version: 1.0 Content-Disposition: inline Subject: [kernel-hardening] [PATCH] Kconfig: Make STRICT_DEVMEM default-y on x86 and arm64 X-Virus-Scanned: ClamAV using ClamSMTP Distros have been shipping with CONFIG_STRICT_DEVMEM=y for years now. It is probably time to flip this default for x86 and arm64. Signed-off-by: Kees Cook Acked-by: Laura Abbott --- lib/Kconfig.debug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 947d3e2ed5c2..39b123d04a36 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -1985,7 +1985,7 @@ config STRICT_DEVMEM bool "Filter access to /dev/mem" depends on MMU && DEVMEM depends on ARCH_HAS_DEVMEM_IS_ALLOWED - default y if TILE || PPC + default y if TILE || PPC || X86 || ARM64 ---help--- If this option is disabled, you allow userspace (root) access to all of memory, including kernel and userspace memory. Accidental