]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
UBUNTU: SAUCE: (efi-lockdown) Lock down /proc/kcore
authorDavid Howells <dhowells@redhat.com>
Mon, 18 Feb 2019 12:45:02 +0000 (12:45 +0000)
committerPaolo Pisati <paolo.pisati@canonical.com>
Mon, 16 Sep 2019 13:06:44 +0000 (15:06 +0200)
Disallow access to /proc/kcore when the kernel is locked down to prevent
access to cryptographic data.

Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: James Morris <james.l.morris@oracle.com>
Signed-off-by: Matthew Garrett <matthewgarrett@google.com>
(cherry picked from commit ae7a30d69a5422bcbc803592b49640330811030a
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
fs/proc/kcore.c

index f5834488b67d564d91b5534c210fc7fcd8e95969..0639228c49046f2df8545eadb66a0da24c559eaa 100644 (file)
@@ -545,6 +545,8 @@ out:
 
 static int open_kcore(struct inode *inode, struct file *filp)
 {
+       if (kernel_is_locked_down("/proc/kcore"))
+               return -EPERM;
        if (!capable(CAP_SYS_RAWIO))
                return -EPERM;