lkml.org 
[lkml]   [2014]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Kernel panic at Ubuntu: IMA + Apparmor
On Fri, Apr 25, 2014 at 01:45:17PM -0700, Eric W. Biederman wrote:

> IMA-appraisal is fundamentally broken because I can take a mandatory
> file lock and prevent IMA-apprasial.
>
> Using kernel_read is what allows this.
>
> > Isn't it a clear motivating case???
>
> kernel_read is not appropriate for IMA use. The rest of this is just
> the messenger.
>
> IMA needs to use a cousin of kernel_read that operates at a lower level
> than vfs_read. A function that all of the permission checks and the
> fsnotify work.

It's worse than that, actually ;-/ IMA hooks in __fput() have interesting
interplay with revoke-related stuff as well. Another very messy thing in
the same area is that it actually does ->read() from under ->i_mutex, leading
to all kinds of interesting locking issues...

I doubt that your "let's open-code vfs_read() guts" would be a good idea;
if nothing else, it might make more sense to make rw_verify_area() skip
the mandlock and security theatre when called in such situation.

What a mess... ;-/


\
 
 \ /
  Last update: 2014-04-26 00:01    [W:1.514 / U:1.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site