Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965350Ab2JCQZS (ORCPT ); Wed, 3 Oct 2012 12:25:18 -0400 Received: from mail-ie0-f174.google.com ([209.85.223.174]:47216 "EHLO mail-ie0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932772Ab2JCQZO (ORCPT ); Wed, 3 Oct 2012 12:25:14 -0400 MIME-Version: 1.0 In-Reply-To: <506C4F29.4090303@gmail.com> References: <20120820180037.GV4232@outflux.net> <20121002153841.a03ad73b.akpm@linux-foundation.org> <506C4F29.4090303@gmail.com> Date: Wed, 3 Oct 2012 09:25:13 -0700 X-Google-Sender-Auth: MvUKrDxg0aliz41dV6_TwjaXdsg Message-ID: Subject: Re: Updated: [PATCH] hardening: add PROT_FINAL prot flag to mmap/mprotect From: Kees Cook To: Ard Biesheuvel Cc: Hugh Dickins , Andrew Morton , linux-kernel@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 X-System-Of-Record: true Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1069 Lines: 31 On Wed, Oct 3, 2012 at 7:43 AM, Ard Biesheuvel wrote: > This patch adds support for the PROT_FINAL flag to > the mmap() and mprotect() syscalls. > > The PROT_FINAL flag indicates that the requested set > of protection bits should be final, i.e., it shall > not be allowed for a subsequent mprotect call to > set protection bits that were not set already. > > This is mainly intended for the dynamic linker, > which sets up the address space on behalf of > dynamic binaries. By using this flag, it can > prevent exploited code from remapping read-only > executable code or data sections read-write. > > Signed-off-by: Ard Biesheuvel Reviewed-by: Kees Cook If it wasn't clear before, I like this idea. :) -Kees -- Kees Cook Chrome OS Security -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/