Thread (30 messages) 30 messages, 6 authors, 2019-06-05

Re: [PATCH 1/8] security: Override creds in __fput() with last fputter's creds [ver #2]

From: Andy Lutomirski <luto@kernel.org>
Date: 2019-06-04 18:15:29
Also in: keyrings, linux-block, linux-fsdevel, linux-security-module, lkml

On Tue, Jun 4, 2019 at 9:35 AM David Howells [off-list ref] wrote:
So that the LSM can see the credentials of the last process to do an fput()
on a file object when the file object is being dismantled, do the following
steps:

 (1) Cache the current credentials in file->f_fput_cred at the point the
     file object's reference count reaches zero.
I don't think it's valid to capture credentials in close().  This
sounds very easy to spoof, especially when you consider that you can
stick an fd in unix socket and aim it at a service that's just going
to ignore it and close it.

IOW I think this is at least as invalid as looking at current_cred()
in write(), which is a classic bug that gets repeated regularly.

--Andy
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help