Re: [PATCH v4.9.y] KEYS: restrict /proc/keys by credentials at open time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 14, 2019 at 09:26:53AM -0700, Zubin Mithra wrote:
> From: Eric Biggers <ebiggers@xxxxxxxxxx>
> 
> commit 4aa68e07d845562561f5e73c04aa521376e95252 upstream
> 
> When checking for permission to view keys whilst reading from
> /proc/keys, we should use the credentials with which the /proc/keys file
> was opened.  This is because, in a classic type of exploit, it can be
> possible to bypass checks for the *current* credentials by passing the
> file descriptor to a suid program.
> 
> Following commit 34dbbcdbf633 ("Make file credentials available to the
> seqfile interfaces") we can finally fix it.  So let's do it.
> 
> Signed-off-by: Eric Biggers <ebiggers@xxxxxxxxxx>
> Signed-off-by: David Howells <dhowells@xxxxxxxxxx>
> Signed-off-by: Zubin Mithra <zsm@xxxxxxxxxxxx>
> ---
> * A test confirmed that when reading from a file descriptor
> corresponding to /proc/keys the permissions for the reader were being
> used instead of the permissions of the user who opened the file.
> 
> This patch is required for 4.4.y as well; however, the original patch
> will apply cleanly there. I'll send a separate request for the same.

Now queued up, thanks.

greg k-h



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux