All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/12] Security: Add CAP_COMPROMISE_KERNEL
@ 2013-03-18 21:32 ` Matthew Garrett
  0 siblings, 0 replies; 129+ messages in thread
From: Matthew Garrett @ 2013-03-18 21:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-security-module, linux-efi, kexec, linux-pci, Matthew Garrett

Caring about protecting the kernel from UID 0 was previously relatively
uninteresting, since an attacker could simply modify the kernel, a module
or an earlier part of the boot chain in order to insert new code. However,
there are now a range of widely-deployed mechanisms for ensuring the
authenticity of the early boot process and kernel. The addition of module
signing makes most of these attacks infeasible.

This means we can return our focus to the kernel. There's currently a number
of kernel interfaces that permit privileged userspace to modify the running
kernel. These are currently protected by CAP_SYS_RAWIO, but unfortunately
the semantics of this capability are poorly defined and it now covers a large
superset of the desired behaviour.

This patch introduces CAP_COMPROMISE_KERNEL. Holding this capability
indicates that a process is empowered to perform tasks that may result in
modification of the running kernel. While aimed at handling the specific
use-case of Secure Boot, it is generalisable to any other environment where
permitting userspace to modify the kernel is undesirable.

Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
---
 include/uapi/linux/capability.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/include/uapi/linux/capability.h b/include/uapi/linux/capability.h
index ba478fa..7109e650 100644
--- a/include/uapi/linux/capability.h
+++ b/include/uapi/linux/capability.h
@@ -343,7 +343,11 @@ struct vfs_cap_data {
 
 #define CAP_BLOCK_SUSPEND    36
 
-#define CAP_LAST_CAP         CAP_BLOCK_SUSPEND
+/* Allow things that trivially permit root to modify the running kernel */
+
+#define CAP_COMPROMISE_KERNEL  37
+
+#define CAP_LAST_CAP         CAP_COMPROMISE_KERNEL
 
 #define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP)
 
-- 
1.8.1.2


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

end of thread, other threads:[~2013-03-28 12:46 UTC | newest]

Thread overview: 129+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-18 21:32 [PATCH 01/12] Security: Add CAP_COMPROMISE_KERNEL Matthew Garrett
2013-03-18 21:32 ` Matthew Garrett
2013-03-18 21:32 ` [PATCH 02/12] SELinux: define mapping for CAP_COMPROMISE_KERNEL Matthew Garrett
2013-03-18 21:32   ` Matthew Garrett
2013-03-18 21:32   ` Matthew Garrett
2013-03-18 21:32 ` [PATCH 03/12] Secure boot: Add a dummy kernel parameter that will switch on Secure Boot mode Matthew Garrett
2013-03-18 21:32   ` Matthew Garrett
2013-03-18 21:32 ` [PATCH 04/12] efi: Enable secure boot lockdown automatically when enabled in firmware Matthew Garrett
2013-03-18 21:32   ` Matthew Garrett
2013-03-18 21:32   ` Matthew Garrett
2013-03-18 21:32 ` [PATCH 05/12] PCI: Require CAP_COMPROMISE_KERNEL for PCI BAR access Matthew Garrett
2013-03-18 21:32   ` Matthew Garrett
2013-03-27 15:03   ` Josh Boyer
2013-03-27 15:03     ` Josh Boyer
2013-03-27 15:08     ` Kyle McMartin
2013-03-27 15:08       ` Kyle McMartin
2013-03-28 12:46       ` Josh Boyer
2013-03-28 12:46         ` Josh Boyer
2013-03-18 21:32 ` [PATCH 06/12] x86: Require CAP_COMPROMISE_KERNEL for IO port access Matthew Garrett
2013-03-18 21:32   ` Matthew Garrett
2013-03-20  1:00   ` H. Peter Anvin
2013-03-20  1:00     ` H. Peter Anvin
2013-03-18 21:32 ` [PATCH 07/12] ACPI: Limit access to custom_method Matthew Garrett
2013-03-18 21:32   ` Matthew Garrett
2013-03-18 21:32   ` Matthew Garrett
2013-03-18 21:32 ` [PATCH 08/12] asus-wmi: Restrict debugfs interface Matthew Garrett
2013-03-18 21:32   ` Matthew Garrett
2013-03-18 21:32 ` [PATCH 09/12] Require CAP_COMPROMISE_KERNEL for /dev/mem and /dev/kmem access Matthew Garrett
2013-03-18 21:32   ` Matthew Garrett
2013-03-18 21:32 ` [PATCH 10/12] acpi: Ignore acpi_rsdp kernel parameter in a secure boot environment Matthew Garrett
2013-03-18 21:32   ` Matthew Garrett
2013-03-18 21:32   ` Matthew Garrett
2013-03-19  8:47   ` Dave Young
2013-03-19  8:47     ` Dave Young
2013-03-19  8:47     ` Dave Young
2013-03-19 11:19     ` Josh Boyer
2013-03-19 11:19       ` Josh Boyer
2013-03-19 11:19       ` Josh Boyer
2013-03-19 17:07       ` [PATCH v2] " Josh Boyer
2013-03-19 17:07         ` Josh Boyer
2013-03-18 21:32 ` [PATCH 11/12] x86: Require CAP_COMPROMISE_KERNEL for MSR writing Matthew Garrett
2013-03-18 21:32   ` Matthew Garrett
2013-03-18 21:32   ` Matthew Garrett
2013-03-18 21:32 ` [PATCH 12/12] kexec: Require CAP_SYS_COMPROMISE_KERNEL Matthew Garrett
2013-03-18 21:32   ` Matthew Garrett
2013-03-18 21:32   ` Matthew Garrett
2013-03-19  4:47 ` [PATCH 01/12] Security: Add CAP_COMPROMISE_KERNEL James Morris
2013-03-19  4:47   ` James Morris
2013-03-19  4:47   ` James Morris
2013-03-20  1:03   ` H. Peter Anvin
2013-03-20  1:03     ` H. Peter Anvin
2013-03-20 16:41   ` Mimi Zohar
2013-03-20 16:41     ` Mimi Zohar
2013-03-20 16:49     ` Matthew Garrett
2013-03-20 16:49       ` Matthew Garrett
2013-03-20 16:49       ` Matthew Garrett
2013-03-20 16:49       ` Matthew Garrett
2013-03-20 18:01       ` Mimi Zohar
2013-03-20 18:01         ` Mimi Zohar
2013-03-20 18:01         ` Mimi Zohar
2013-03-20 18:12         ` Matthew Garrett
2013-03-20 18:12           ` Matthew Garrett
2013-03-20 18:12           ` Matthew Garrett
2013-03-20 18:12           ` Matthew Garrett
2013-03-20 19:16           ` Mimi Zohar
2013-03-20 19:16             ` Mimi Zohar
2013-03-20 19:16             ` Mimi Zohar
2013-03-20 19:16             ` Mimi Zohar
2013-03-20 20:37             ` Matthew Garrett
2013-03-20 20:37               ` Matthew Garrett
2013-03-20 20:37               ` Matthew Garrett
2013-03-20 20:37               ` Matthew Garrett
2013-03-20 21:11               ` Mimi Zohar
2013-03-20 21:11                 ` Mimi Zohar
2013-03-20 21:11                 ` Mimi Zohar
2013-03-20 21:18                 ` Matthew Garrett
2013-03-20 21:18                   ` Matthew Garrett
2013-03-20 21:18                   ` Matthew Garrett
2013-03-20 21:18                   ` Matthew Garrett
2013-03-21 13:43                   ` Vivek Goyal
2013-03-21 13:43                     ` Vivek Goyal
2013-03-21 13:43                     ` Vivek Goyal
2013-03-21 13:43                     ` Vivek Goyal
2013-03-21 15:37                     ` Serge E. Hallyn
2013-03-21 15:37                       ` Serge E. Hallyn
2013-03-21 15:37                       ` Serge E. Hallyn
2013-03-21 15:37                       ` Serge E. Hallyn
2013-03-21 15:52                       ` Vivek Goyal
2013-03-21 15:52                         ` Vivek Goyal
2013-03-21 15:52                         ` Vivek Goyal
2013-03-21 15:52                         ` Vivek Goyal
2013-03-21 15:58                         ` Serge E. Hallyn
2013-03-21 15:58                           ` Serge E. Hallyn
2013-03-21 15:58                           ` Serge E. Hallyn
2013-03-21 15:58                           ` Serge E. Hallyn
2013-03-21 16:04                           ` Vivek Goyal
2013-03-21 16:04                             ` Vivek Goyal
2013-03-21 16:04                             ` Vivek Goyal
2013-03-21 16:19                             ` Serge E. Hallyn
2013-03-21 16:19                               ` Serge E. Hallyn
2013-03-21 16:19                               ` Serge E. Hallyn
2013-03-21 16:19                               ` Serge E. Hallyn
2013-03-21 17:15                               ` Vivek Goyal
2013-03-21 17:15                                 ` Vivek Goyal
2013-03-21 17:15                                 ` Vivek Goyal
2013-03-21 17:15                                 ` Vivek Goyal
2013-03-21  1:58     ` James Morris
2013-03-21  1:58       ` James Morris
2013-03-19  7:18 ` Yves-Alexis Perez
2013-03-19  7:18   ` Yves-Alexis Perez
2013-03-20  1:02 ` H. Peter Anvin
2013-03-20  1:02   ` H. Peter Anvin
2013-03-20  1:05   ` H. Peter Anvin
2013-03-20  1:05     ` H. Peter Anvin
2013-03-20 13:15   ` Matthew Garrett
2013-03-20 13:15     ` Matthew Garrett
2013-03-20 13:15     ` Matthew Garrett
2013-03-20 13:15     ` Matthew Garrett
2013-03-20 15:03     ` H. Peter Anvin
2013-03-20 15:03       ` H. Peter Anvin
2013-03-20 15:03       ` H. Peter Anvin
2013-03-20 15:03       ` H. Peter Anvin
2013-03-20 15:14       ` Matthew Garrett
2013-03-20 15:14         ` Matthew Garrett
2013-03-20 15:14         ` Matthew Garrett
2013-03-20 15:14         ` Matthew Garrett
2013-03-20 16:45         ` H. Peter Anvin
2013-03-20 16:45           ` H. Peter Anvin
2013-03-20 16:45           ` H. Peter Anvin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.