diff options
| author | Andy Lutomirski <luto@kernel.org> | 2015-09-04 18:42:51 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-09-04 19:54:41 -0400 |
| commit | 746bf6d64275be0c65b0631d8a72b16f1454cfa1 (patch) | |
| tree | 5debc8e6f0207fdea53271f631f37e319d39fff4 /include/uapi/linux | |
| parent | 32ae976ed3b5ba39c9208ace41bcdf4157d21db3 (diff) | |
capabilities: add a securebit to disable PR_CAP_AMBIENT_RAISE
Per Andrew Morgan's request, add a securebit to allow admins to disable
PR_CAP_AMBIENT_RAISE. This securebit will prevent processes from adding
capabilities to their ambient set.
For simplicity, this disables PR_CAP_AMBIENT_RAISE entirely rather than
just disabling setting previously cleared bits.
Signed-off-by: Andy Lutomirski <luto@kernel.org>
Acked-by: Andrew G. Morgan <morgan@kernel.org>
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Christoph Lameter <cl@linux.com>
Cc: Serge Hallyn <serge.hallyn@canonical.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Aaron Jones <aaronmdjones@gmail.com>
Cc: Ted Ts'o <tytso@mit.edu>
Cc: Andrew G. Morgan <morgan@kernel.org>
Cc: Mimi Zohar <zohar@linux.vnet.ibm.com>
Cc: Austin S Hemmelgarn <ahferroin7@gmail.com>
Cc: Markku Savela <msa@moth.iki.fi>
Cc: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: James Morris <james.l.morris@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/uapi/linux')
| -rw-r--r-- | include/uapi/linux/securebits.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/uapi/linux/securebits.h b/include/uapi/linux/securebits.h index 985aac9e6bf8..35ac35cef217 100644 --- a/include/uapi/linux/securebits.h +++ b/include/uapi/linux/securebits.h | |||
| @@ -43,9 +43,18 @@ | |||
| 43 | #define SECBIT_KEEP_CAPS (issecure_mask(SECURE_KEEP_CAPS)) | 43 | #define SECBIT_KEEP_CAPS (issecure_mask(SECURE_KEEP_CAPS)) |
| 44 | #define SECBIT_KEEP_CAPS_LOCKED (issecure_mask(SECURE_KEEP_CAPS_LOCKED)) | 44 | #define SECBIT_KEEP_CAPS_LOCKED (issecure_mask(SECURE_KEEP_CAPS_LOCKED)) |
| 45 | 45 | ||
| 46 | /* When set, a process cannot add new capabilities to its ambient set. */ | ||
| 47 | #define SECURE_NO_CAP_AMBIENT_RAISE 6 | ||
| 48 | #define SECURE_NO_CAP_AMBIENT_RAISE_LOCKED 7 /* make bit-6 immutable */ | ||
| 49 | |||
| 50 | #define SECBIT_NO_CAP_AMBIENT_RAISE (issecure_mask(SECURE_NO_CAP_AMBIENT_RAISE)) | ||
| 51 | #define SECBIT_NO_CAP_AMBIENT_RAISE_LOCKED \ | ||
| 52 | (issecure_mask(SECURE_NO_CAP_AMBIENT_RAISE_LOCKED)) | ||
| 53 | |||
| 46 | #define SECURE_ALL_BITS (issecure_mask(SECURE_NOROOT) | \ | 54 | #define SECURE_ALL_BITS (issecure_mask(SECURE_NOROOT) | \ |
| 47 | issecure_mask(SECURE_NO_SETUID_FIXUP) | \ | 55 | issecure_mask(SECURE_NO_SETUID_FIXUP) | \ |
| 48 | issecure_mask(SECURE_KEEP_CAPS)) | 56 | issecure_mask(SECURE_KEEP_CAPS) | \ |
| 57 | issecure_mask(SECURE_NO_CAP_AMBIENT_RAISE)) | ||
| 49 | #define SECURE_ALL_LOCKS (SECURE_ALL_BITS << 1) | 58 | #define SECURE_ALL_LOCKS (SECURE_ALL_BITS << 1) |
| 50 | 59 | ||
| 51 | #endif /* _UAPI_LINUX_SECUREBITS_H */ | 60 | #endif /* _UAPI_LINUX_SECUREBITS_H */ |
