Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752723Ab3CETcD (ORCPT ); Tue, 5 Mar 2013 14:32:03 -0500 Received: from mail-ob0-f175.google.com ([209.85.214.175]:48716 "EHLO mail-ob0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750767Ab3CETcA (ORCPT ); Tue, 5 Mar 2013 14:32:00 -0500 MIME-Version: 1.0 In-Reply-To: References: <20130303005700.GA32213@austin.hallyn.com> <874ngtxgt5.fsf@xmission.com> <874ngsrvrh.fsf@xmission.com> <87k3pnmwpk.fsf_-_@xmission.com> <878v63mwm3.fsf_-_@xmission.com> Date: Tue, 5 Mar 2013 11:32:00 -0800 Message-ID: Subject: Re: [PATCH 2/2] fs: Limit sys_mount to only request filesystem modules. From: Kees Cook To: Kay Sievers Cc: "Eric W. Biederman" , "Serge E. Hallyn" , LKML , Serge Hallyn , Brad Spengler , Al Viro , PaX Team , "linux-fsdevel@vger.kernel.org" , Linux Containers , Dave Jones Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1479 Lines: 37 On Tue, Mar 5, 2013 at 11:06 AM, Kay Sievers wrote: > On Mon, Mar 4, 2013 at 8:51 AM, Eric W. Biederman wrote: >> >> Modify the request_module to prefix the file system type with "fs-" >> and add aliases to all of the filesystems that can be built as modules >> to match. >> >> A common practice is to build all of the kernel code and leave code >> that is not commonly needed as modules, with the result that many >> users are exposed to any bug anywhere in the kernel. >> >> Looking for filesystems with a fs- prefix limits the pool of possible >> modules that can be loaded by mount to just filesystems trivially >> making things safer with no real cost. > > '-' is a commonly used part of a module name, and does not mix well > with ramdom user provided names. > > We usually use ':' as the prefix separator for modaliases, when > user-supplied strings are prefixed with the subsystem. > > I think it would be nicer to change that, and I'm sure some creative > guy calls the next filesystem of the month fs-$something :) The precedent is "-". "netdev-" "pf-net-" etc. Naming something fs-$something is fine as long as it's actually a filesystem. :) -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/