From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi0-f69.google.com (mail-oi0-f69.google.com [209.85.218.69]) by kanga.kvack.org (Postfix) with ESMTP id EA36B6B025F for ; Mon, 7 Aug 2017 15:46:42 -0400 (EDT) Received: by mail-oi0-f69.google.com with SMTP id b130so1078697oii.4 for ; Mon, 07 Aug 2017 12:46:42 -0700 (PDT) Received: from mail-io0-x22b.google.com (mail-io0-x22b.google.com. [2607:f8b0:4001:c06::22b]) by mx.google.com with ESMTPS id h3si6036577oia.98.2017.08.07.12.46.41 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Aug 2017 12:46:42 -0700 (PDT) Received: by mail-io0-x22b.google.com with SMTP id o9so6362940iod.1 for ; Mon, 07 Aug 2017 12:46:41 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <1502131739.1803.12.camel@gmail.com> From: Kees Cook Date: Mon, 7 Aug 2017 12:46:40 -0700 Message-ID: Subject: Re: binfmt_elf: use ELF_ET_DYN_BASE only for PIE breaks asan Content-Type: text/plain; charset="UTF-8" Sender: owner-linux-mm@kvack.org List-ID: To: Kostya Serebryany Cc: Daniel Micay , Dmitry Vyukov , Michal Hocko , Andrew Morton , "linux-mm@kvack.org" , Rik van Riel , Reid Kleckner , Peter Collingbourne , Evgeniy Stepanov On Mon, Aug 7, 2017 at 12:40 PM, Kostya Serebryany wrote: > > > On Mon, Aug 7, 2017 at 12:34 PM, Kees Cook wrote: >> >> (To be clear, this subthread is for dealing with _future_ changes; I'm >> already preparing the revert, which is in the other subthread.) >> >> On Mon, Aug 7, 2017 at 12:26 PM, Kostya Serebryany wrote: >> > Oh, a launcher (e.g. just using setarch) would be a huge pain to deploy. >> >> Would loading the executable into the mmap region work? > > This is beyond my knowledge. :( > Could you explain? PIE has a separate randomization base (before at 0x5555 5555 4000, currently 0x1 0000 0000) from the mmap (DSO) area (0x7f00 0000 0000-ish). The primary reason to keep PIE separate from mmap is to avoid leaking ASLR offsets between them, but if that's less of a concern for *San, then we could just load PIE into the mmap region. > If we can do this w/o a launcher (and w/o re-executing), we should try. Let me think about the best way to do this... -Kees -- Kees Cook Pixel Security -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org