Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S263898AbUAIEQt (ORCPT ); Thu, 8 Jan 2004 23:16:49 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S264284AbUAIEQt (ORCPT ); Thu, 8 Jan 2004 23:16:49 -0500 Received: from dp.samba.org ([66.70.73.150]:11488 "EHLO lists.samba.org") by vger.kernel.org with ESMTP id S263898AbUAIEQs (ORCPT ); Thu, 8 Jan 2004 23:16:48 -0500 Date: Fri, 9 Jan 2004 15:15:36 +1100 From: Anton Blanchard To: Andrew Morton Cc: Jesper Juhl , linux-kernel@vger.kernel.org, ericy@cais.com Subject: Re: [PATCH][RFC] invalid ELF binaries can execute - better sanity checking Message-ID: <20040109041536.GB25504@krispykreme> References: <20040108192021.6c2aea60.akpm@osdl.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040108192021.6c2aea60.akpm@osdl.org> User-Agent: Mutt/1.5.5.1+cvs20040105i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 964 Lines: 22 > I've always had little confidence in the elf loader. The problem is > complex, the code quality is not high and the consequences of an error are > severe. One thing I noticed is that we only obey execute permission on load sections. On ppc32 the PLT is in the bss area and must be executable: [27] .sbss PROGBITS 100ba10c 0aa10c 000a14 00 WA 0 0 8 [28] .plt PROGBITS 100bab20 0aab20 000834 00 WAX 0 0 4 [29] .bss NOBITS 100bb358 0ab354 003f90 00 WA 0 0 8 When I did per page execute for ppc64 we fell apart because the current elf loader just creates a single region of non executable memory regardless of what the binary asks for. Anton - 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/