Re: [PATCH v7] fs: clear file privilege bits when mmap writing

2016-01-21 Thread Kees Cook
On Thu, Jan 21, 2016 at 3:22 PM, Jann Horn wrote: > On Mon, Jan 11, 2016 at 02:57:50PM -0800, Kees Cook wrote: >> Normally, when a user can modify a file that has setuid or setgid bits, >> those bits are cleared when they are not the file owner or a member >> of the group. This is enforced when

Re: [PATCH v7] fs: clear file privilege bits when mmap writing

2016-01-21 Thread Jann Horn
On Mon, Jan 11, 2016 at 02:57:50PM -0800, Kees Cook wrote: > Normally, when a user can modify a file that has setuid or setgid bits, > those bits are cleared when they are not the file owner or a member > of the group. This is enforced when using write and truncate but not > when writing to a

Re: [PATCH v7] fs: clear file privilege bits when mmap writing

2016-01-21 Thread Kees Cook
On Thu, Jan 21, 2016 at 3:22 PM, Jann Horn wrote: > On Mon, Jan 11, 2016 at 02:57:50PM -0800, Kees Cook wrote: >> Normally, when a user can modify a file that has setuid or setgid bits, >> those bits are cleared when they are not the file owner or a member >> of the group. This is

Re: [PATCH v7] fs: clear file privilege bits when mmap writing

2016-01-21 Thread Jann Horn
On Mon, Jan 11, 2016 at 02:57:50PM -0800, Kees Cook wrote: > Normally, when a user can modify a file that has setuid or setgid bits, > those bits are cleared when they are not the file owner or a member > of the group. This is enforced when using write and truncate but not > when writing to a