public inbox for linux-cifs@vger.kernel.org
 help / color / mirror / Atom feed
* cifs multiuser mode and per session treatment
@ 2019-12-13 12:14 Björn JACKE
  2019-12-16 11:38 ` Aurélien Aptel
  0 siblings, 1 reply; 3+ messages in thread
From: Björn JACKE @ 2019-12-13 12:14 UTC (permalink / raw)
  To: linux-cifs

Hi,

I'm trying to use cifs vfs with multiuser mode in a way, that it's not possible
for people with root privileges to hijack other users' SMB sessions of a
multiuser mount.

For authentication I use krb5. The first problem to solve is that root users
can access the ccache files of any user who is authenticated and has a
/tmp/krb5cc_%{uid} file. This problem can be solved with a ccache type of
session keyring (default_ccache_name = KEYRING:session:%{uid} in krb5.conf).
This is doing exactly what I expect, you can get a ticket but if you log in to
the server once more you will not have that ccache and thus also other users
logging in and trying to "su" to a different user will not have access to the
keyring of the user.

cifs.upcall might need some tuning to make use of a session keyring but even if
that would be done, there is still one important limitation left to solve: cifs
multiuser SMB connections should also be initiated per session, same like the
keyring. Currently the cifs SMB connections are accessible also from other all
sessions.

For example if I kinit a ticket, access a multiuser cifs mount successfully (so
that the smb session is initiated), then kdestroy my ticket, log in to the
machine again to open a new session, and then access the multiuser cifs mount
from there, this is currently successful. For a cifs multiuser mount with per
session limitation, this access should be denied accordingly.

What do you cifs vfs experts think about adding such a "per session" mode for
the multiuser mode?

Thanks
Björn

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

end of thread, other threads:[~2019-12-17 10:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-13 12:14 cifs multiuser mode and per session treatment Björn JACKE
2019-12-16 11:38 ` Aurélien Aptel
2019-12-17 10:07   ` Björn JACKE

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox