From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752951AbbCDVQs (ORCPT ); Wed, 4 Mar 2015 16:16:48 -0500 Received: from smtp.outflux.net ([198.145.64.163]:38103 "EHLO smtp.outflux.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752910AbbCDVQo (ORCPT ); Wed, 4 Mar 2015 16:16:44 -0500 From: Kees Cook To: akpm@linux-foundation.org Cc: Kees Cook , Ingo Molnar , Michael Ellerman , Hector Marco-Gisbert , Ismael Ripoll , Russell King , Catalin Marinas , Will Deacon , Ralf Baechle , Benjamin Herrenschmidt , Paul Mackerras , Martin Schwidefsky , Heiko Carstens , linux390@de.ibm.com, x86@kernel.org, Alexander Viro , Andy Lutomirski , Oleg Nesterov , "David A. Long" , Andrey Ryabinin , Arun Chandran , Yann Droneaud , Min-Hua Chen , Paul Burton , Alex Smith , Markos Chandras , Vineeth Vijayan , Jeff Bailey , Michael Holzheu , Ben Hutchings , Borislav Petkov , =?UTF-8?q?Jan-Simon=20M=C3=B6ller?= , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@linux-mips.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH v4 0/10] split ET_DYN ASLR from mmap ASLR Date: Wed, 4 Mar 2015 13:10:44 -0800 Message-Id: <1425503454-7531-1-git-send-email-keescook@chromium.org> X-Mailer: git-send-email 1.9.1 X-HELO: www.outflux.net Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org To address the "offset2lib" ASLR weakness[1], this separates ET_DYN ASLR from mmap ASLR, as already done on s390. The architectures that are already randomizing mmap (arm, arm64, mips, powerpc, s390, and x86), have their various forms of arch_mmap_rnd() made available via the new CONFIG_ARCH_HAS_ELF_RANDOMIZE. For these architectures, arch_randomize_brk() is collapsed as well. This is an alternative to the solutions in: https://lkml.org/lkml/2015/2/23/442 I've been able to test x86 and arm, and the buildbot (so far) seems happy with building the rest. Thanks! -Kees [1] http://cybersecurity.upv.es/attacks/offset2lib/offset2lib.html v4: - added Ack on powerpc (mpe) - fixed mmap_base argument convention to be the same on all archs - corrected paste-o in mips variable names (buildbot) - clarified ET_DYN vs mmap ASLR regions in 9/10 (mpe) v3: - split change on a per-arch basis for easier review - moved PF_RANDOMIZE check out of per-arch code (ingo) v2: - verbosified the commit logs, especially 4/5 (akpm) From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kees Cook Subject: [PATCH v4 0/10] split ET_DYN ASLR from mmap ASLR Date: Wed, 4 Mar 2015 13:10:44 -0800 Message-ID: <1425503454-7531-1-git-send-email-keescook@chromium.org> Cc: Kees Cook , Ingo Molnar , Michael Ellerman , Hector Marco-Gisbert , Ismael Ripoll , Russell King , Catalin Marinas , Will Deacon , Ralf Baechle , Benjamin Herrenschmidt , Paul Mackerras , Martin Schwidefsky , Heiko Carstens , linux390@de.ibm.com, x86@kernel.org, Alexander Viro , Andy Lutomirski , Oleg Nesterov , "David A. Long" , Andrey Ryabinin , Arun Chandran To: akpm@linux-foundation.org Return-path: Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-subscribe: List-owner: List-post: List-archive: List-Id: linux-fsdevel.vger.kernel.org To address the "offset2lib" ASLR weakness[1], this separates ET_DYN ASLR from mmap ASLR, as already done on s390. The architectures that are already randomizing mmap (arm, arm64, mips, powerpc, s390, and x86), have their various forms of arch_mmap_rnd() made available via the new CONFIG_ARCH_HAS_ELF_RANDOMIZE. For these architectures, arch_randomize_brk() is collapsed as well. This is an alternative to the solutions in: https://lkml.org/lkml/2015/2/23/442 I've been able to test x86 and arm, and the buildbot (so far) seems happy with building the rest. Thanks! -Kees [1] http://cybersecurity.upv.es/attacks/offset2lib/offset2lib.html v4: - added Ack on powerpc (mpe) - fixed mmap_base argument convention to be the same on all archs - corrected paste-o in mips variable names (buildbot) - clarified ET_DYN vs mmap ASLR regions in 9/10 (mpe) v3: - split change on a per-arch basis for easier review - moved PF_RANDOMIZE check out of per-arch code (ingo) v2: - verbosified the commit logs, especially 4/5 (akpm) From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.outflux.net (smtp.outflux.net [IPv6:2001:19d0:2:6:c0de:0:736d:7470]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id B87C61A0DC9 for ; Thu, 5 Mar 2015 08:16:21 +1100 (AEDT) From: Kees Cook To: akpm@linux-foundation.org Subject: [PATCH v4 0/10] split ET_DYN ASLR from mmap ASLR Date: Wed, 4 Mar 2015 13:10:44 -0800 Message-Id: <1425503454-7531-1-git-send-email-keescook@chromium.org> Cc: linux-mips@linux-mips.org, Arun Chandran , Heiko Carstens , linux-kernel@vger.kernel.org, Min-Hua Chen , Paul Mackerras , Ismael Ripoll , Yann Droneaud , linux-s390@vger.kernel.org, Russell King , Andrey Ryabinin , x86@kernel.org, Hector Marco-Gisbert , Ingo Molnar , "David A. Long" , Catalin Marinas , Borislav Petkov , Ben Hutchings , Kees Cook , Will Deacon , linux-fsdevel@vger.kernel.org, Alexander Viro , Michael Holzheu , linux-arm-kernel@lists.infradead.org, Jeff Bailey , Paul Burton , Oleg Nesterov , Ralf Baechle , Andy Lutomirski , Vineeth Vijayan , Markos Chandras , =?UTF-8?q?Jan-Simon=20M=C3=B6ller?= , Martin Schwidefsky , linux390@de.ibm.com, linuxppc-dev@lists.ozlabs.org, Alex Smith List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To address the "offset2lib" ASLR weakness[1], this separates ET_DYN ASLR from mmap ASLR, as already done on s390. The architectures that are already randomizing mmap (arm, arm64, mips, powerpc, s390, and x86), have their various forms of arch_mmap_rnd() made available via the new CONFIG_ARCH_HAS_ELF_RANDOMIZE. For these architectures, arch_randomize_brk() is collapsed as well. This is an alternative to the solutions in: https://lkml.org/lkml/2015/2/23/442 I've been able to test x86 and arm, and the buildbot (so far) seems happy with building the rest. Thanks! -Kees [1] http://cybersecurity.upv.es/attacks/offset2lib/offset2lib.html v4: - added Ack on powerpc (mpe) - fixed mmap_base argument convention to be the same on all archs - corrected paste-o in mips variable names (buildbot) - clarified ET_DYN vs mmap ASLR regions in 9/10 (mpe) v3: - split change on a per-arch basis for easier review - moved PF_RANDOMIZE check out of per-arch code (ingo) v2: - verbosified the commit logs, especially 4/5 (akpm) From mboxrd@z Thu Jan 1 00:00:00 1970 From: keescook@chromium.org (Kees Cook) Date: Wed, 4 Mar 2015 13:10:44 -0800 Subject: [PATCH v4 0/10] split ET_DYN ASLR from mmap ASLR Message-ID: <1425503454-7531-1-git-send-email-keescook@chromium.org> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org To address the "offset2lib" ASLR weakness[1], this separates ET_DYN ASLR from mmap ASLR, as already done on s390. The architectures that are already randomizing mmap (arm, arm64, mips, powerpc, s390, and x86), have their various forms of arch_mmap_rnd() made available via the new CONFIG_ARCH_HAS_ELF_RANDOMIZE. For these architectures, arch_randomize_brk() is collapsed as well. This is an alternative to the solutions in: https://lkml.org/lkml/2015/2/23/442 I've been able to test x86 and arm, and the buildbot (so far) seems happy with building the rest. Thanks! -Kees [1] http://cybersecurity.upv.es/attacks/offset2lib/offset2lib.html v4: - added Ack on powerpc (mpe) - fixed mmap_base argument convention to be the same on all archs - corrected paste-o in mips variable names (buildbot) - clarified ET_DYN vs mmap ASLR regions in 9/10 (mpe) v3: - split change on a per-arch basis for easier review - moved PF_RANDOMIZE check out of per-arch code (ingo) v2: - verbosified the commit logs, especially 4/5 (akpm)