linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Commit 13c164b1a186 - regression for LSMs/SELinux?
@ 2020-09-21 14:51 Ondrej Mosnacek
  2020-09-21 16:09 ` Christoph Hellwig
  0 siblings, 1 reply; 23+ messages in thread
From: Ondrej Mosnacek @ 2020-09-21 14:51 UTC (permalink / raw)
  To: Christoph Hellwig, Ian Kent
  Cc: autofs, Linux Security Module list, SElinux list, Zdenek Pytela

Hi folks,

It seems that after commit 13c164b1a186 ("autofs: switch to
kernel_write") there is now an extra LSM permission required (for the
current task to write to the automount pipe) for processes accessing
some yet-to-to-be mounted directory on which an autofs mount is set
up. The call chain is:
[...]
autofs_wait() ->
autofs_notify_daemon() ->
autofs_write() ->
kernel_write() ->
rw_verify_area() ->
security_file_permission()

The bug report that led me to this commit is at [1].

Technically, this is a regression for LSM users, since this is a
kernel-internal operation and an LSM permission for the current task
shouldn't be required. Can this patch be reverted? Perhaps
__kernel_{read|write}() could instead be renamed to kernel_*_nocheck()
so that the name is more descriptive?

Thanks,

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1874338

-- 
Ondrej Mosnacek
Software Engineer, Platform Security - SELinux kernel
Red Hat, Inc.


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2020-09-30 10:39 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-21 14:51 Commit 13c164b1a186 - regression for LSMs/SELinux? Ondrej Mosnacek
2020-09-21 16:09 ` Christoph Hellwig
2020-09-21 16:27   ` Linus Torvalds
2020-09-21 16:30   ` Al Viro
2020-09-22  0:30     ` Ian Kent
2020-09-22  1:35       ` Ian Kent
2020-09-22  7:33     ` Ondrej Mosnacek
2020-09-22 12:29       ` Stephen Smalley
2020-09-23  1:55       ` Ian Kent
2020-09-24  8:36         ` Ondrej Mosnacek
2020-09-24  9:47           ` Ian Kent
2020-09-24 14:16           ` Stephen Smalley
2020-09-25  3:37             ` Ian Kent
2020-09-25  3:44               ` Ian Kent
2020-09-25 13:37             ` Ondrej Mosnacek
2020-09-25 17:38               ` Linus Torvalds
2020-09-27  3:07                 ` Ian Kent
2020-09-29 12:16                   ` Ondrej Mosnacek
2020-09-29 17:23                     ` Linus Torvalds
2020-09-29 18:00                       ` Christoph Hellwig
2020-09-30  5:50                         ` Ian Kent
2020-09-30 10:39                           ` Ian Kent
2020-09-30  5:42                     ` Ian Kent

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).