From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932478AbbCIPPt (ORCPT ); Mon, 9 Mar 2015 11:15:49 -0400 Received: from pandora.arm.linux.org.uk ([78.32.30.218]:32907 "EHLO pandora.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751562AbbCIPPq (ORCPT ); Mon, 9 Mar 2015 11:15:46 -0400 Date: Mon, 9 Mar 2015 15:15:26 +0000 From: Russell King - ARM Linux To: Kees Cook Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, Catalin Marinas , Will Deacon , Ralf Baechle , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Martin Schwidefsky , Heiko Carstens , linux390@de.ibm.com, x86@kernel.org, Alexander Viro , Oleg Nesterov , Andy Lutomirski , "David A. Long" , Andrey Ryabinin , Arun Chandran , Yann Droneaud , Min-Hua Chen , Paul Burton , Alex Smith , Markos Chandras , Jeff Bailey , Vineeth Vijayan , Michael Holzheu , Ben Hutchings , Hector Marco-Gisbert , Borislav Petkov , Jan-Simon =?iso-8859-1?Q?M=F6ller?= , 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: Re: [PATCH v2 0/5] split ET_DYN ASLR from mmap ASLR Message-ID: <20150309151526.GQ8656@n2100.arm.linux.org.uk> References: <1425341988-1599-1-git-send-email-keescook@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1425341988-1599-1-git-send-email-keescook@chromium.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 02, 2015 at 04:19:43PM -0800, Kees Cook wrote: > 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 run this on one of my ARM platforms, and it looks fine. 2a05e000-2a05f000 r-xp 00000000 00:10 7750376 /root/offset2lib/get_offset2lib 2a066000-2a067000 r--p 00000000 00:10 7750376 /root/offset2lib/get_offset2lib 2a067000-2a068000 rw-p 00001000 00:10 7750376 /root/offset2lib/get_offset2lib b6dfd000-b6ed3000 r-xp 00000000 00:10 1376508 /lib/arm-linux-gnueabihf/libc-2.15.so b6ed3000-b6eda000 ---p 000d6000 00:10 1376508 /lib/arm-linux-gnueabihf/libc-2.15.so b6eda000-b6edc000 r--p 000d5000 00:10 1376508 /lib/arm-linux-gnueabihf/libc-2.15.so b6edc000-b6edd000 rw-p 000d7000 00:10 1376508 /lib/arm-linux-gnueabihf/libc-2.15.so b6edd000-b6ee0000 rw-p 00000000 00:00 0 b6ef9000-b6f10000 r-xp 00000000 00:10 1376509 /lib/arm-linux-gnueabihf/ld-2.15.so b6f13000-b6f17000 rw-p 00000000 00:00 0 b6f17000-b6f18000 r--p 00016000 00:10 1376509 /lib/arm-linux-gnueabihf/ld-2.15.so b6f18000-b6f19000 rw-p 00017000 00:10 1376509 /lib/arm-linux-gnueabihf/ld-2.15.so bea3b000-bea5c000 rw-p 00000000 00:00 0 [stack] bec22000-bec23000 r-xp 00000000 00:00 0 [sigpage] ffff0000-ffff1000 r-xp 00000000 00:00 0 [vectors] And offset2lib shows a random offset: Offset2lib (libc): 0xffffffff73261000 Offset2lib (libc): 0xffffffff732ce000 Offset2lib (libc): 0xffffffff731b1000 Offset2lib (libc): 0xffffffff73252000 So, for ARM: Tested-by: Russell King Thanks. -- FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up according to speedtest.net.