Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759353Ab2J0RFL (ORCPT ); Sat, 27 Oct 2012 13:05:11 -0400 Received: from mail-ob0-f174.google.com ([209.85.214.174]:56015 "EHLO mail-ob0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932319Ab2J0RFE (ORCPT ); Sat, 27 Oct 2012 13:05:04 -0400 MIME-Version: 1.0 In-Reply-To: References: <20121024232032.GA31129@www.outflux.net> <20121025041620.GH2616@ZenIV.linux.org.uk> <20121025120952.GI2616@ZenIV.linux.org.uk> <20121025123843.GJ2616@ZenIV.linux.org.uk> <20121026183601.GR2616@ZenIV.linux.org.uk> Date: Sat, 27 Oct 2012 10:05:03 -0700 X-Google-Sender-Auth: 1zSC-WndOKqVO9xaBso5ylSeG0k Message-ID: Subject: Re: [PATCH] exec: do not leave bprm->interp on stack From: Kees Cook To: P J P Cc: Al Viro , linux-kernel@vger.kernel.org, Andrew Morton , Josh Triplett , Serge Hallyn , linux-fsdevel@vger.kernel.org, halfdog 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: 1312 Lines: 32 On Sat, Oct 27, 2012 at 3:47 AM, P J P wrote: > +-- On Fri, 26 Oct 2012, Al Viro wrote --+ > | > not. Module alias could dodge this though, I guess. > | "Could"? Can you show a single module that would have name matching > | binfmt-[0-9a-f]*? In other words, are they ever loaded _not_ via an > | alias? > > I understand. I was wondering if alias information is accessible in the > kernel via any routine, alike find_module(). > > Just to get perspective about how many times request_module() would be called > with the latest patch, in general installations(or distributions), how > prevalent(in use) are binfmt-xxxx loadable modules? Al showed a list of them earlier in the thread. I don't have any on the various distros I checked. The problem I see here is that we only want to do module loading in the "no match" case. But that means that either we need to restart with the original bprm, or we need to keep bprm changes off the stack. Leading with a module load is going to wreck performance. -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/