Re: [PATCH v3] devtmpfs: mount with noexec and nosuid

2012-11-21 Thread Alan Cox
> This instructs the kernel to include the MS_NOEXEC and MS_NOSUID mount > flags when mounting devtmpfs. So does a mount syscall > In-kernel separation of executable and non-executable code combined > with a proper executability policy is a basic technique to prote

Re: [PATCH v3] devtmpfs: mount with noexec and nosuid

2012-11-20 Thread Roland Eggner
On 2012-11-20 Tuesday at 13:50 -0800 Kees Cook wrote: > Since devtmpfs is writable, make the default noexec,nosuid as well. This > protects from the case of a privileged process having an arbitrary file > write flaw and an argumentless arbitrary execution (i.e. it would lack > the ability to run "m

Re: [PATCH v3] devtmpfs: mount with noexec and nosuid

2012-11-20 Thread Alan Cox
> I'm not trying to say it's a magic cure-all. This feature is just for > trying to build a system that follows security best-practices: nothing If you want to talk about security practices then please do so rather than using it as a magic label for cluelessness. > I don't need a specific example

Re: [PATCH v3] devtmpfs: mount with noexec and nosuid

2012-11-20 Thread Kees Cook
On Tue, Nov 20, 2012 at 4:05 PM, Alan Cox wrote: >> +config DEVTMPFS_SAFE >> + bool "Use nosuid,noexec mount options on devtmpfs" >> + depends on DEVTMPFS >> + help >> + This instructs the kernel to include the MS_NOEXEC and >> + MS_NOSUID mount flags when mounting devtmpfs

Re: [PATCH v3] devtmpfs: mount with noexec and nosuid

2012-11-20 Thread Alan Cox
> +config DEVTMPFS_SAFE > + bool "Use nosuid,noexec mount options on devtmpfs" > + depends on DEVTMPFS > + help > + This instructs the kernel to include the MS_NOEXEC and > + MS_NOSUID mount flags when mounting devtmpfs. This prevents > + certain kinds of code-executio

[PATCH v3] devtmpfs: mount with noexec and nosuid

2012-11-20 Thread Kees Cook
Since devtmpfs is writable, make the default noexec,nosuid as well. This protects from the case of a privileged process having an arbitrary file write flaw and an argumentless arbitrary execution (i.e. it would lack the ability to run "mount -o remount,exec,suid /dev"). Rather than relying on user