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

2017-02-07 Thread Kees Cook
On Fri, Jan 27, 2017 at 7:47 PM, Andy Lutomirski wrote: > On Wed, May 25, 2016 at 2:49 PM, Al Viro wrote: >> On Wed, May 25, 2016 at 02:36:57PM -0700, Kees Cook wrote: >> >>> Hm, this didn't end up getting picked up. (This jumped out at me again >>>

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

2017-02-07 Thread Kees Cook
On Fri, Jan 27, 2017 at 7:47 PM, Andy Lutomirski wrote: > On Wed, May 25, 2016 at 2:49 PM, Al Viro wrote: >> On Wed, May 25, 2016 at 02:36:57PM -0700, Kees Cook wrote: >> >>> Hm, this didn't end up getting picked up. (This jumped out at me again >>> because i_mutex just vanished...) >>> >>> Al,

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

2017-01-27 Thread Andy Lutomirski
On Wed, May 25, 2016 at 2:49 PM, Al Viro wrote: > On Wed, May 25, 2016 at 02:36:57PM -0700, Kees Cook wrote: > >> Hm, this didn't end up getting picked up. (This jumped out at me again >> because i_mutex just vanished...) >> >> Al, what's the right way to update the

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

2017-01-27 Thread Andy Lutomirski
On Wed, May 25, 2016 at 2:49 PM, Al Viro wrote: > On Wed, May 25, 2016 at 02:36:57PM -0700, Kees Cook wrote: > >> Hm, this didn't end up getting picked up. (This jumped out at me again >> because i_mutex just vanished...) >> >> Al, what's the right way to update the locking in this patch? > >

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

2016-05-25 Thread Al Viro
On Wed, May 25, 2016 at 02:36:57PM -0700, Kees Cook wrote: > Hm, this didn't end up getting picked up. (This jumped out at me again > because i_mutex just vanished...) > > Al, what's the right way to update the locking in this patch? ->i_mutex is dealt with just by using

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

2016-05-25 Thread Al Viro
On Wed, May 25, 2016 at 02:36:57PM -0700, Kees Cook wrote: > Hm, this didn't end up getting picked up. (This jumped out at me again > because i_mutex just vanished...) > > Al, what's the right way to update the locking in this patch? ->i_mutex is dealt with just by using

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

2016-05-25 Thread Kees Cook
On Thu, Jan 14, 2016 at 9:55 PM, Konstantin Khlebnikov wrote: > On Fri, Jan 15, 2016 at 12:22 AM, 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

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

2016-05-25 Thread Kees Cook
On Thu, Jan 14, 2016 at 9:55 PM, Konstantin Khlebnikov wrote: > On Fri, Jan 15, 2016 at 12:22 AM, 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