Re: [PATCH v6 4/7] fs: Introduce O_MAYEXEC flag for openat2(2)

2020-07-16 Thread Kees Cook
On Thu, Jul 16, 2020 at 04:18:27PM +0200, Mickaël Salaün wrote: > On 15/07/2020 22:06, Kees Cook wrote: > > On Tue, Jul 14, 2020 at 08:16:35PM +0200, Mickaël Salaün wrote: > >> The implementation of O_MAYEXEC almost duplicates what execve(2) and > >> uselib(2) are already doing: setting MAY_OPENEXE

Re: [PATCH v6 4/7] fs: Introduce O_MAYEXEC flag for openat2(2)

2020-07-16 Thread Mickaël Salaün
On 15/07/2020 22:06, Kees Cook wrote: > On Tue, Jul 14, 2020 at 08:16:35PM +0200, Mickaël Salaün wrote: >> When the O_MAYEXEC flag is passed, openat2(2) may be subject to >> additional restrictions depending on a security policy managed by the >> kernel through a sysctl or implemented by an LSM t

Re: [PATCH v6 4/7] fs: Introduce O_MAYEXEC flag for openat2(2)

2020-07-15 Thread Kees Cook
On Tue, Jul 14, 2020 at 08:16:35PM +0200, Mickaël Salaün wrote: > When the O_MAYEXEC flag is passed, openat2(2) may be subject to > additional restrictions depending on a security policy managed by the > kernel through a sysctl or implemented by an LSM thanks to the > inode_permission hook. This n

[PATCH v6 4/7] fs: Introduce O_MAYEXEC flag for openat2(2)

2020-07-14 Thread Mickaël Salaün
When the O_MAYEXEC flag is passed, openat2(2) may be subject to additional restrictions depending on a security policy managed by the kernel through a sysctl or implemented by an LSM thanks to the inode_permission hook. This new flag is ignored by open(2) and openat(2) because of their unspecified