lkml.org 
[lkml]   [2018]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Fix sync. in blkdev_write_iter() acessing i_flags
On Fri, Dec 07, 2018 at 08:49:16PM +0100, Alexander Lochmann wrote:

> > _What_ SUID bit? We are talking about a write to block device, for fsck sake...
> >
> That's the way I understood Jan's explanation:
> "
> Thinking more about this I'm not sure if this is actually the right
> solution. Because for example the write(2) can set S_NOSEC flag wrongly
> when it would race with chmod adding SUID bit. So probably we rather need
> to acquire i_rwsem in blkdev_write_iter() if file does not have S_NOSEC set
> (we don't want to acquire it unconditionally as that would heavily impact
> scalability of block device writes).

IDGI. We are talking about a block device here. What business could
file_remove_privs() have doing _anything_ to it? should_remove_suid() returns
to return 0 for those; what case do you have in mind? Somebody setting
security.capabilities on a block device inode?

IMO the bug here is file_remove_privs() not buggering off immediately
after having observed that we are dealing with a block device. It really
has nothing useful to do.

\
 
 \ /
  Last update: 2018-12-08 01:50    [W:0.080 / U:0.936 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site