diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-09-12 16:21:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-09-12 16:21:00 -0400 |
commit | 7f85565a3f7194b966de71926471d69788b6b9c3 (patch) | |
tree | 95f93ab1d18dc1121cd5ec71309c7e6cb4dedc7b | |
parent | 680352bda57e3dbf21cddf6a5e23aff7e294fb31 (diff) | |
parent | 0c3014f22dec0e1d14c8298551bfb6434638bdd9 (diff) |
Merge tag 'selinux-pr-20170831' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux
Pull selinux updates from Paul Moore:
"A relatively quiet period for SELinux, 11 patches with only two/three
having any substantive changes.
These noteworthy changes include another tweak to the NNP/nosuid
handling, per-file labeling for cgroups, and an object class fix for
AF_UNIX/SOCK_RAW sockets; the rest of the changes are minor tweaks or
administrative updates (Stephen's email update explains the file
explosion in the diffstat).
Everything passes the selinux-testsuite"
[ Also a couple of small patches from the security tree from Tetsuo
Handa for Tomoyo and LSM cleanup. The separation of security policy
updates wasn't all that clean - Linus ]
* tag 'selinux-pr-20170831' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux:
selinux: constify nf_hook_ops
selinux: allow per-file labeling for cgroupfs
lsm_audit: update my email address
selinux: update my email address
MAINTAINERS: update the NetLabel and Labeled Networking information
selinux: use GFP_NOWAIT in the AVC kmem_caches
selinux: Generalize support for NNP/nosuid SELinux domain transitions
selinux: genheaders should fail if too many permissions are defined
selinux: update the selinux info in MAINTAINERS
credits: update Paul Moore's info
selinux: Assign proper class to PF_UNIX/SOCK_RAW sockets
tomoyo: Update URLs in Documentation/admin-guide/LSM/tomoyo.rst
LSM: Remove security_task_create() hook.
36 files changed, 117 insertions, 104 deletions
@@ -2606,11 +2606,9 @@ E: tmolina@cablespeed.com | |||
2606 | D: bug fixes, documentation, minor hackery | 2606 | D: bug fixes, documentation, minor hackery |
2607 | 2607 | ||
2608 | N: Paul Moore | 2608 | N: Paul Moore |
2609 | E: paul.moore@hp.com | 2609 | E: paul@paul-moore.com |
2610 | D: NetLabel author | 2610 | W: http://www.paul-moore.com |
2611 | S: Hewlett-Packard | 2611 | D: NetLabel, SELinux, audit |
2612 | S: 110 Spit Brook Road | ||
2613 | S: Nashua, NH 03062 | ||
2614 | 2612 | ||
2615 | N: James Morris | 2613 | N: James Morris |
2616 | E: jmorris@namei.org | 2614 | E: jmorris@namei.org |
diff --git a/Documentation/admin-guide/LSM/tomoyo.rst b/Documentation/admin-guide/LSM/tomoyo.rst index a5947218fa64..e2d6b6e15082 100644 --- a/Documentation/admin-guide/LSM/tomoyo.rst +++ b/Documentation/admin-guide/LSM/tomoyo.rst | |||
@@ -9,8 +9,8 @@ TOMOYO is a name-based MAC extension (LSM module) for the Linux kernel. | |||
9 | 9 | ||
10 | LiveCD-based tutorials are available at | 10 | LiveCD-based tutorials are available at |
11 | 11 | ||
12 | http://tomoyo.sourceforge.jp/1.7/1st-step/ubuntu10.04-live/ | 12 | http://tomoyo.sourceforge.jp/1.8/ubuntu12.04-live.html |
13 | http://tomoyo.sourceforge.jp/1.7/1st-step/centos5-live/ | 13 | http://tomoyo.sourceforge.jp/1.8/centos6-live.html |
14 | 14 | ||
15 | Though these tutorials use non-LSM version of TOMOYO, they are useful for you | 15 | Though these tutorials use non-LSM version of TOMOYO, they are useful for you |
16 | to know what TOMOYO is. | 16 | to know what TOMOYO is. |
@@ -21,35 +21,35 @@ How to enable TOMOYO? | |||
21 | Build the kernel with ``CONFIG_SECURITY_TOMOYO=y`` and pass ``security=tomoyo`` on | 21 | Build the kernel with ``CONFIG_SECURITY_TOMOYO=y`` and pass ``security=tomoyo`` on |
22 | kernel's command line. | 22 | kernel's command line. |
23 | 23 | ||
24 | Please see http://tomoyo.sourceforge.jp/2.3/ for details. | 24 | Please see http://tomoyo.osdn.jp/2.5/ for details. |
25 | 25 | ||
26 | Where is documentation? | 26 | Where is documentation? |
27 | ======================= | 27 | ======================= |
28 | 28 | ||
29 | User <-> Kernel interface documentation is available at | 29 | User <-> Kernel interface documentation is available at |
30 | http://tomoyo.sourceforge.jp/2.3/policy-reference.html . | 30 | http://tomoyo.osdn.jp/2.5/policy-specification/index.html . |
31 | 31 | ||
32 | Materials we prepared for seminars and symposiums are available at | 32 | Materials we prepared for seminars and symposiums are available at |
33 | http://sourceforge.jp/projects/tomoyo/docs/?category_id=532&language_id=1 . | 33 | http://osdn.jp/projects/tomoyo/docs/?category_id=532&language_id=1 . |
34 | Below lists are chosen from three aspects. | 34 | Below lists are chosen from three aspects. |
35 | 35 | ||
36 | What is TOMOYO? | 36 | What is TOMOYO? |
37 | TOMOYO Linux Overview | 37 | TOMOYO Linux Overview |
38 | http://sourceforge.jp/projects/tomoyo/docs/lca2009-takeda.pdf | 38 | http://osdn.jp/projects/tomoyo/docs/lca2009-takeda.pdf |
39 | TOMOYO Linux: pragmatic and manageable security for Linux | 39 | TOMOYO Linux: pragmatic and manageable security for Linux |
40 | http://sourceforge.jp/projects/tomoyo/docs/freedomhectaipei-tomoyo.pdf | 40 | http://osdn.jp/projects/tomoyo/docs/freedomhectaipei-tomoyo.pdf |
41 | TOMOYO Linux: A Practical Method to Understand and Protect Your Own Linux Box | 41 | TOMOYO Linux: A Practical Method to Understand and Protect Your Own Linux Box |
42 | http://sourceforge.jp/projects/tomoyo/docs/PacSec2007-en-no-demo.pdf | 42 | http://osdn.jp/projects/tomoyo/docs/PacSec2007-en-no-demo.pdf |
43 | 43 | ||
44 | What can TOMOYO do? | 44 | What can TOMOYO do? |
45 | Deep inside TOMOYO Linux | 45 | Deep inside TOMOYO Linux |
46 | http://sourceforge.jp/projects/tomoyo/docs/lca2009-kumaneko.pdf | 46 | http://osdn.jp/projects/tomoyo/docs/lca2009-kumaneko.pdf |
47 | The role of "pathname based access control" in security. | 47 | The role of "pathname based access control" in security. |
48 | http://sourceforge.jp/projects/tomoyo/docs/lfj2008-bof.pdf | 48 | http://osdn.jp/projects/tomoyo/docs/lfj2008-bof.pdf |
49 | 49 | ||
50 | History of TOMOYO? | 50 | History of TOMOYO? |
51 | Realities of Mainlining | 51 | Realities of Mainlining |
52 | http://sourceforge.jp/projects/tomoyo/docs/lfj2008.pdf | 52 | http://osdn.jp/projects/tomoyo/docs/lfj2008.pdf |
53 | 53 | ||
54 | What is future plan? | 54 | What is future plan? |
55 | ==================== | 55 | ==================== |
@@ -60,6 +60,6 @@ multiple LSM modules at the same time. We feel sorry that you have to give up | |||
60 | SELinux/SMACK/AppArmor etc. when you want to use TOMOYO. | 60 | SELinux/SMACK/AppArmor etc. when you want to use TOMOYO. |
61 | 61 | ||
62 | We hope that LSM becomes stackable in future. Meanwhile, you can use non-LSM | 62 | We hope that LSM becomes stackable in future. Meanwhile, you can use non-LSM |
63 | version of TOMOYO, available at http://tomoyo.sourceforge.jp/1.7/ . | 63 | version of TOMOYO, available at http://tomoyo.osdn.jp/1.8/ . |
64 | LSM version of TOMOYO is a subset of non-LSM version of TOMOYO. We are planning | 64 | LSM version of TOMOYO is a subset of non-LSM version of TOMOYO. We are planning |
65 | to port non-LSM version's functionalities to LSM versions. | 65 | to port non-LSM version's functionalities to LSM versions. |
diff --git a/MAINTAINERS b/MAINTAINERS index fbb269415f06..e57a4eaec077 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -9298,15 +9298,6 @@ F: net/*/netfilter/ | |||
9298 | F: net/netfilter/ | 9298 | F: net/netfilter/ |
9299 | F: net/bridge/br_netfilter*.c | 9299 | F: net/bridge/br_netfilter*.c |
9300 | 9300 | ||
9301 | NETLABEL | ||
9302 | M: Paul Moore <paul@paul-moore.com> | ||
9303 | W: http://netlabel.sf.net | ||
9304 | L: netdev@vger.kernel.org | ||
9305 | S: Maintained | ||
9306 | F: Documentation/netlabel/ | ||
9307 | F: include/net/netlabel.h | ||
9308 | F: net/netlabel/ | ||
9309 | |||
9310 | NETROM NETWORK LAYER | 9301 | NETROM NETWORK LAYER |
9311 | M: Ralf Baechle <ralf@linux-mips.org> | 9302 | M: Ralf Baechle <ralf@linux-mips.org> |
9312 | L: linux-hams@vger.kernel.org | 9303 | L: linux-hams@vger.kernel.org |
@@ -9434,10 +9425,23 @@ F: net/ipv6/ | |||
9434 | F: include/net/ip* | 9425 | F: include/net/ip* |
9435 | F: arch/x86/net/* | 9426 | F: arch/x86/net/* |
9436 | 9427 | ||
9437 | NETWORKING [LABELED] (NetLabel, CIPSO, Labeled IPsec, SECMARK) | 9428 | NETWORKING [LABELED] (NetLabel, Labeled IPsec, SECMARK) |
9438 | M: Paul Moore <paul@paul-moore.com> | 9429 | M: Paul Moore <paul@paul-moore.com> |
9430 | W: https://github.com/netlabel | ||
9439 | L: netdev@vger.kernel.org | 9431 | L: netdev@vger.kernel.org |
9432 | L: linux-security-module@vger.kernel.org | ||
9440 | S: Maintained | 9433 | S: Maintained |
9434 | F: Documentation/netlabel/ | ||
9435 | F: include/net/calipso.h | ||
9436 | F: include/net/cipso_ipv4.h | ||
9437 | F: include/net/netlabel.h | ||
9438 | F: include/uapi/linux/netfilter/xt_SECMARK.h | ||
9439 | F: include/uapi/linux/netfilter/xt_CONNSECMARK.h | ||
9440 | F: net/netlabel/ | ||
9441 | F: net/ipv4/cipso_ipv4.c | ||
9442 | F: net/ipv6/calipso.c | ||
9443 | F: net/netfilter/xt_CONNSECMARK.c | ||
9444 | F: net/netfilter/xt_SECMARK.c | ||
9441 | 9445 | ||
9442 | NETWORKING [TLS] | 9446 | NETWORKING [TLS] |
9443 | M: Ilya Lesokhin <ilyal@mellanox.com> | 9447 | M: Ilya Lesokhin <ilyal@mellanox.com> |
@@ -12023,8 +12027,9 @@ M: Paul Moore <paul@paul-moore.com> | |||
12023 | M: Stephen Smalley <sds@tycho.nsa.gov> | 12027 | M: Stephen Smalley <sds@tycho.nsa.gov> |
12024 | M: Eric Paris <eparis@parisplace.org> | 12028 | M: Eric Paris <eparis@parisplace.org> |
12025 | L: selinux@tycho.nsa.gov (moderated for non-subscribers) | 12029 | L: selinux@tycho.nsa.gov (moderated for non-subscribers) |
12026 | W: http://selinuxproject.org | 12030 | W: https://selinuxproject.org |
12027 | T: git git://git.infradead.org/users/pcmoore/selinux | 12031 | W: https://github.com/SELinuxProject |
12032 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux.git | ||
12028 | S: Supported | 12033 | S: Supported |
12029 | F: include/linux/selinux* | 12034 | F: include/linux/selinux* |
12030 | F: security/selinux/ | 12035 | F: security/selinux/ |
diff --git a/include/linux/lsm_audit.h b/include/linux/lsm_audit.h index 22b5d4e687ce..d1c2901f1542 100644 --- a/include/linux/lsm_audit.h +++ b/include/linux/lsm_audit.h | |||
@@ -4,7 +4,7 @@ | |||
4 | * | 4 | * |
5 | * Author : Etienne BASSET <etienne.basset@ensta.org> | 5 | * Author : Etienne BASSET <etienne.basset@ensta.org> |
6 | * | 6 | * |
7 | * All credits to : Stephen Smalley, <sds@epoch.ncsc.mil> | 7 | * All credits to : Stephen Smalley, <sds@tycho.nsa.gov> |
8 | * All BUGS to : Etienne BASSET <etienne.basset@ensta.org> | 8 | * All BUGS to : Etienne BASSET <etienne.basset@ensta.org> |
9 | */ | 9 | */ |
10 | #ifndef _LSM_COMMON_LOGGING_ | 10 | #ifndef _LSM_COMMON_LOGGING_ |
diff --git a/include/linux/lsm_hooks.h b/include/linux/lsm_hooks.h index d1c7bef25691..c9258124e417 100644 --- a/include/linux/lsm_hooks.h +++ b/include/linux/lsm_hooks.h | |||
@@ -528,11 +528,6 @@ | |||
528 | * | 528 | * |
529 | * Security hooks for task operations. | 529 | * Security hooks for task operations. |
530 | * | 530 | * |
531 | * @task_create: | ||
532 | * Check permission before creating a child process. See the clone(2) | ||
533 | * manual page for definitions of the @clone_flags. | ||
534 | * @clone_flags contains the flags indicating what should be shared. | ||
535 | * Return 0 if permission is granted. | ||
536 | * @task_alloc: | 531 | * @task_alloc: |
537 | * @task task being allocated. | 532 | * @task task being allocated. |
538 | * @clone_flags contains the flags indicating what should be shared. | 533 | * @clone_flags contains the flags indicating what should be shared. |
@@ -1505,7 +1500,6 @@ union security_list_options { | |||
1505 | int (*file_receive)(struct file *file); | 1500 | int (*file_receive)(struct file *file); |
1506 | int (*file_open)(struct file *file, const struct cred *cred); | 1501 | int (*file_open)(struct file *file, const struct cred *cred); |
1507 | 1502 | ||
1508 | int (*task_create)(unsigned long clone_flags); | ||
1509 | int (*task_alloc)(struct task_struct *task, unsigned long clone_flags); | 1503 | int (*task_alloc)(struct task_struct *task, unsigned long clone_flags); |
1510 | void (*task_free)(struct task_struct *task); | 1504 | void (*task_free)(struct task_struct *task); |
1511 | int (*cred_alloc_blank)(struct cred *cred, gfp_t gfp); | 1505 | int (*cred_alloc_blank)(struct cred *cred, gfp_t gfp); |
@@ -1779,7 +1773,6 @@ struct security_hook_heads { | |||
1779 | struct list_head file_send_sigiotask; | 1773 | struct list_head file_send_sigiotask; |
1780 | struct list_head file_receive; | 1774 | struct list_head file_receive; |
1781 | struct list_head file_open; | 1775 | struct list_head file_open; |
1782 | struct list_head task_create; | ||
1783 | struct list_head task_alloc; | 1776 | struct list_head task_alloc; |
1784 | struct list_head task_free; | 1777 | struct list_head task_free; |
1785 | struct list_head cred_alloc_blank; | 1778 | struct list_head cred_alloc_blank; |
diff --git a/include/linux/security.h b/include/linux/security.h index 707b524874d8..ce6265960d6c 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -318,7 +318,6 @@ int security_file_send_sigiotask(struct task_struct *tsk, | |||
318 | struct fown_struct *fown, int sig); | 318 | struct fown_struct *fown, int sig); |
319 | int security_file_receive(struct file *file); | 319 | int security_file_receive(struct file *file); |
320 | int security_file_open(struct file *file, const struct cred *cred); | 320 | int security_file_open(struct file *file, const struct cred *cred); |
321 | int security_task_create(unsigned long clone_flags); | ||
322 | int security_task_alloc(struct task_struct *task, unsigned long clone_flags); | 321 | int security_task_alloc(struct task_struct *task, unsigned long clone_flags); |
323 | void security_task_free(struct task_struct *task); | 322 | void security_task_free(struct task_struct *task); |
324 | int security_cred_alloc_blank(struct cred *cred, gfp_t gfp); | 323 | int security_cred_alloc_blank(struct cred *cred, gfp_t gfp); |
@@ -880,11 +879,6 @@ static inline int security_file_open(struct file *file, | |||
880 | return 0; | 879 | return 0; |
881 | } | 880 | } |
882 | 881 | ||
883 | static inline int security_task_create(unsigned long clone_flags) | ||
884 | { | ||
885 | return 0; | ||
886 | } | ||
887 | |||
888 | static inline int security_task_alloc(struct task_struct *task, | 882 | static inline int security_task_alloc(struct task_struct *task, |
889 | unsigned long clone_flags) | 883 | unsigned long clone_flags) |
890 | { | 884 | { |
diff --git a/kernel/fork.c b/kernel/fork.c index 6f1b0af00bda..10646182440f 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -1569,10 +1569,6 @@ static __latent_entropy struct task_struct *copy_process( | |||
1569 | return ERR_PTR(-EINVAL); | 1569 | return ERR_PTR(-EINVAL); |
1570 | } | 1570 | } |
1571 | 1571 | ||
1572 | retval = security_task_create(clone_flags); | ||
1573 | if (retval) | ||
1574 | goto fork_out; | ||
1575 | |||
1576 | retval = -ENOMEM; | 1572 | retval = -ENOMEM; |
1577 | p = dup_task_struct(current, node); | 1573 | p = dup_task_struct(current, node); |
1578 | if (!p) | 1574 | if (!p) |
diff --git a/scripts/selinux/genheaders/genheaders.c b/scripts/selinux/genheaders/genheaders.c index 6a24569c3578..672b069dcfea 100644 --- a/scripts/selinux/genheaders/genheaders.c +++ b/scripts/selinux/genheaders/genheaders.c | |||
@@ -129,11 +129,16 @@ int main(int argc, char *argv[]) | |||
129 | for (i = 0; secclass_map[i].name; i++) { | 129 | for (i = 0; secclass_map[i].name; i++) { |
130 | struct security_class_mapping *map = &secclass_map[i]; | 130 | struct security_class_mapping *map = &secclass_map[i]; |
131 | for (j = 0; map->perms[j]; j++) { | 131 | for (j = 0; map->perms[j]; j++) { |
132 | if (j >= 32) { | ||
133 | fprintf(stderr, "Too many permissions to fit into an access vector at (%s, %s).\n", | ||
134 | map->name, map->perms[j]); | ||
135 | exit(5); | ||
136 | } | ||
132 | fprintf(fout, "#define %s__%s", map->name, | 137 | fprintf(fout, "#define %s__%s", map->name, |
133 | map->perms[j]); | 138 | map->perms[j]); |
134 | for (k = 0; k < max(1, 40 - strlen(map->name) - strlen(map->perms[j])); k++) | 139 | for (k = 0; k < max(1, 40 - strlen(map->name) - strlen(map->perms[j])); k++) |
135 | fprintf(fout, " "); | 140 | fprintf(fout, " "); |
136 | fprintf(fout, "0x%08xUL\n", (1<<j)); | 141 | fprintf(fout, "0x%08xU\n", (1<<j)); |
137 | } | 142 | } |
138 | } | 143 | } |
139 | 144 | ||
diff --git a/security/lsm_audit.c b/security/lsm_audit.c index 28d4c3a528ab..67703dbe29ea 100644 --- a/security/lsm_audit.c +++ b/security/lsm_audit.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * common LSM auditing functions | 2 | * common LSM auditing functions |
3 | * | 3 | * |
4 | * Based on code written for SELinux by : | 4 | * Based on code written for SELinux by : |
5 | * Stephen Smalley, <sds@epoch.ncsc.mil> | 5 | * Stephen Smalley, <sds@tycho.nsa.gov> |
6 | * James Morris <jmorris@redhat.com> | 6 | * James Morris <jmorris@redhat.com> |
7 | * Author : Etienne Basset, <etienne.basset@ensta.org> | 7 | * Author : Etienne Basset, <etienne.basset@ensta.org> |
8 | * | 8 | * |
diff --git a/security/security.c b/security/security.c index afc34f46c6c5..4bf0f571b4ef 100644 --- a/security/security.c +++ b/security/security.c | |||
@@ -974,11 +974,6 @@ int security_file_open(struct file *file, const struct cred *cred) | |||
974 | return fsnotify_perm(file, MAY_OPEN); | 974 | return fsnotify_perm(file, MAY_OPEN); |
975 | } | 975 | } |
976 | 976 | ||
977 | int security_task_create(unsigned long clone_flags) | ||
978 | { | ||
979 | return call_int_hook(task_create, 0, clone_flags); | ||
980 | } | ||
981 | |||
982 | int security_task_alloc(struct task_struct *task, unsigned long clone_flags) | 977 | int security_task_alloc(struct task_struct *task, unsigned long clone_flags) |
983 | { | 978 | { |
984 | return call_int_hook(task_alloc, 0, task, clone_flags); | 979 | return call_int_hook(task_alloc, 0, task, clone_flags); |
diff --git a/security/selinux/avc.c b/security/selinux/avc.c index 4b4293194aee..2380b8d72cec 100644 --- a/security/selinux/avc.c +++ b/security/selinux/avc.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Implementation of the kernel access vector cache (AVC). | 2 | * Implementation of the kernel access vector cache (AVC). |
3 | * | 3 | * |
4 | * Authors: Stephen Smalley, <sds@epoch.ncsc.mil> | 4 | * Authors: Stephen Smalley, <sds@tycho.nsa.gov> |
5 | * James Morris <jmorris@redhat.com> | 5 | * James Morris <jmorris@redhat.com> |
6 | * | 6 | * |
7 | * Update: KaiGai, Kohei <kaigai@ak.jp.nec.com> | 7 | * Update: KaiGai, Kohei <kaigai@ak.jp.nec.com> |
@@ -346,27 +346,26 @@ static struct avc_xperms_decision_node | |||
346 | struct avc_xperms_decision_node *xpd_node; | 346 | struct avc_xperms_decision_node *xpd_node; |
347 | struct extended_perms_decision *xpd; | 347 | struct extended_perms_decision *xpd; |
348 | 348 | ||
349 | xpd_node = kmem_cache_zalloc(avc_xperms_decision_cachep, | 349 | xpd_node = kmem_cache_zalloc(avc_xperms_decision_cachep, GFP_NOWAIT); |
350 | GFP_ATOMIC | __GFP_NOMEMALLOC); | ||
351 | if (!xpd_node) | 350 | if (!xpd_node) |
352 | return NULL; | 351 | return NULL; |
353 | 352 | ||
354 | xpd = &xpd_node->xpd; | 353 | xpd = &xpd_node->xpd; |
355 | if (which & XPERMS_ALLOWED) { | 354 | if (which & XPERMS_ALLOWED) { |
356 | xpd->allowed = kmem_cache_zalloc(avc_xperms_data_cachep, | 355 | xpd->allowed = kmem_cache_zalloc(avc_xperms_data_cachep, |
357 | GFP_ATOMIC | __GFP_NOMEMALLOC); | 356 | GFP_NOWAIT); |
358 | if (!xpd->allowed) | 357 | if (!xpd->allowed) |
359 | goto error; | 358 | goto error; |
360 | } | 359 | } |
361 | if (which & XPERMS_AUDITALLOW) { | 360 | if (which & XPERMS_AUDITALLOW) { |
362 | xpd->auditallow = kmem_cache_zalloc(avc_xperms_data_cachep, | 361 | xpd->auditallow = kmem_cache_zalloc(avc_xperms_data_cachep, |
363 | GFP_ATOMIC | __GFP_NOMEMALLOC); | 362 | GFP_NOWAIT); |
364 | if (!xpd->auditallow) | 363 | if (!xpd->auditallow) |
365 | goto error; | 364 | goto error; |
366 | } | 365 | } |
367 | if (which & XPERMS_DONTAUDIT) { | 366 | if (which & XPERMS_DONTAUDIT) { |
368 | xpd->dontaudit = kmem_cache_zalloc(avc_xperms_data_cachep, | 367 | xpd->dontaudit = kmem_cache_zalloc(avc_xperms_data_cachep, |
369 | GFP_ATOMIC | __GFP_NOMEMALLOC); | 368 | GFP_NOWAIT); |
370 | if (!xpd->dontaudit) | 369 | if (!xpd->dontaudit) |
371 | goto error; | 370 | goto error; |
372 | } | 371 | } |
@@ -394,8 +393,7 @@ static struct avc_xperms_node *avc_xperms_alloc(void) | |||
394 | { | 393 | { |
395 | struct avc_xperms_node *xp_node; | 394 | struct avc_xperms_node *xp_node; |
396 | 395 | ||
397 | xp_node = kmem_cache_zalloc(avc_xperms_cachep, | 396 | xp_node = kmem_cache_zalloc(avc_xperms_cachep, GFP_NOWAIT); |
398 | GFP_ATOMIC|__GFP_NOMEMALLOC); | ||
399 | if (!xp_node) | 397 | if (!xp_node) |
400 | return xp_node; | 398 | return xp_node; |
401 | INIT_LIST_HEAD(&xp_node->xpd_head); | 399 | INIT_LIST_HEAD(&xp_node->xpd_head); |
@@ -548,7 +546,7 @@ static struct avc_node *avc_alloc_node(void) | |||
548 | { | 546 | { |
549 | struct avc_node *node; | 547 | struct avc_node *node; |
550 | 548 | ||
551 | node = kmem_cache_zalloc(avc_node_cachep, GFP_ATOMIC|__GFP_NOMEMALLOC); | 549 | node = kmem_cache_zalloc(avc_node_cachep, GFP_NOWAIT); |
552 | if (!node) | 550 | if (!node) |
553 | goto out; | 551 | goto out; |
554 | 552 | ||
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index ad3b0f53ede0..f5d304736852 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * This file contains the SELinux hook function implementations. | 4 | * This file contains the SELinux hook function implementations. |
5 | * | 5 | * |
6 | * Authors: Stephen Smalley, <sds@epoch.ncsc.mil> | 6 | * Authors: Stephen Smalley, <sds@tycho.nsa.gov> |
7 | * Chris Vance, <cvance@nai.com> | 7 | * Chris Vance, <cvance@nai.com> |
8 | * Wayne Salamon, <wsalamon@nai.com> | 8 | * Wayne Salamon, <wsalamon@nai.com> |
9 | * James Morris <jmorris@redhat.com> | 9 | * James Morris <jmorris@redhat.com> |
@@ -815,7 +815,9 @@ static int selinux_set_mnt_opts(struct super_block *sb, | |||
815 | if (!strcmp(sb->s_type->name, "debugfs") || | 815 | if (!strcmp(sb->s_type->name, "debugfs") || |
816 | !strcmp(sb->s_type->name, "tracefs") || | 816 | !strcmp(sb->s_type->name, "tracefs") || |
817 | !strcmp(sb->s_type->name, "sysfs") || | 817 | !strcmp(sb->s_type->name, "sysfs") || |
818 | !strcmp(sb->s_type->name, "pstore")) | 818 | !strcmp(sb->s_type->name, "pstore") || |
819 | !strcmp(sb->s_type->name, "cgroup") || | ||
820 | !strcmp(sb->s_type->name, "cgroup2")) | ||
819 | sbsec->flags |= SE_SBGENFS; | 821 | sbsec->flags |= SE_SBGENFS; |
820 | 822 | ||
821 | if (!sbsec->behavior) { | 823 | if (!sbsec->behavior) { |
@@ -1303,6 +1305,7 @@ static inline u16 socket_type_to_security_class(int family, int type, int protoc | |||
1303 | case SOCK_SEQPACKET: | 1305 | case SOCK_SEQPACKET: |
1304 | return SECCLASS_UNIX_STREAM_SOCKET; | 1306 | return SECCLASS_UNIX_STREAM_SOCKET; |
1305 | case SOCK_DGRAM: | 1307 | case SOCK_DGRAM: |
1308 | case SOCK_RAW: | ||
1306 | return SECCLASS_UNIX_DGRAM_SOCKET; | 1309 | return SECCLASS_UNIX_DGRAM_SOCKET; |
1307 | } | 1310 | } |
1308 | break; | 1311 | break; |
@@ -2317,6 +2320,7 @@ static int check_nnp_nosuid(const struct linux_binprm *bprm, | |||
2317 | int nnp = (bprm->unsafe & LSM_UNSAFE_NO_NEW_PRIVS); | 2320 | int nnp = (bprm->unsafe & LSM_UNSAFE_NO_NEW_PRIVS); |
2318 | int nosuid = !mnt_may_suid(bprm->file->f_path.mnt); | 2321 | int nosuid = !mnt_may_suid(bprm->file->f_path.mnt); |
2319 | int rc; | 2322 | int rc; |
2323 | u32 av; | ||
2320 | 2324 | ||
2321 | if (!nnp && !nosuid) | 2325 | if (!nnp && !nosuid) |
2322 | return 0; /* neither NNP nor nosuid */ | 2326 | return 0; /* neither NNP nor nosuid */ |
@@ -2325,24 +2329,40 @@ static int check_nnp_nosuid(const struct linux_binprm *bprm, | |||
2325 | return 0; /* No change in credentials */ | 2329 | return 0; /* No change in credentials */ |
2326 | 2330 | ||
2327 | /* | 2331 | /* |
2328 | * The only transitions we permit under NNP or nosuid | 2332 | * If the policy enables the nnp_nosuid_transition policy capability, |
2329 | * are transitions to bounded SIDs, i.e. SIDs that are | 2333 | * then we permit transitions under NNP or nosuid if the |
2330 | * guaranteed to only be allowed a subset of the permissions | 2334 | * policy allows the corresponding permission between |
2331 | * of the current SID. | 2335 | * the old and new contexts. |
2332 | */ | 2336 | */ |
2333 | rc = security_bounded_transition(old_tsec->sid, new_tsec->sid); | 2337 | if (selinux_policycap_nnp_nosuid_transition) { |
2334 | if (rc) { | 2338 | av = 0; |
2335 | /* | ||
2336 | * On failure, preserve the errno values for NNP vs nosuid. | ||
2337 | * NNP: Operation not permitted for caller. | ||
2338 | * nosuid: Permission denied to file. | ||
2339 | */ | ||
2340 | if (nnp) | 2339 | if (nnp) |
2341 | return -EPERM; | 2340 | av |= PROCESS2__NNP_TRANSITION; |
2342 | else | 2341 | if (nosuid) |
2343 | return -EACCES; | 2342 | av |= PROCESS2__NOSUID_TRANSITION; |
2343 | rc = avc_has_perm(old_tsec->sid, new_tsec->sid, | ||
2344 | SECCLASS_PROCESS2, av, NULL); | ||
2345 | if (!rc) | ||
2346 | return 0; | ||
2344 | } | 2347 | } |
2345 | return 0; | 2348 | |
2349 | /* | ||
2350 | * We also permit NNP or nosuid transitions to bounded SIDs, | ||
2351 | * i.e. SIDs that are guaranteed to only be allowed a subset | ||
2352 | * of the permissions of the current SID. | ||
2353 | */ | ||
2354 | rc = security_bounded_transition(old_tsec->sid, new_tsec->sid); | ||
2355 | if (!rc) | ||
2356 | return 0; | ||
2357 | |||
2358 | /* | ||
2359 | * On failure, preserve the errno values for NNP vs nosuid. | ||
2360 | * NNP: Operation not permitted for caller. | ||
2361 | * nosuid: Permission denied to file. | ||
2362 | */ | ||
2363 | if (nnp) | ||
2364 | return -EPERM; | ||
2365 | return -EACCES; | ||
2346 | } | 2366 | } |
2347 | 2367 | ||
2348 | static int selinux_bprm_set_creds(struct linux_binprm *bprm) | 2368 | static int selinux_bprm_set_creds(struct linux_binprm *bprm) |
diff --git a/security/selinux/include/avc.h b/security/selinux/include/avc.h index 0999df03af8b..a5004e9de11a 100644 --- a/security/selinux/include/avc.h +++ b/security/selinux/include/avc.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Access vector cache interface for object managers. | 2 | * Access vector cache interface for object managers. |
3 | * | 3 | * |
4 | * Author : Stephen Smalley, <sds@epoch.ncsc.mil> | 4 | * Author : Stephen Smalley, <sds@tycho.nsa.gov> |
5 | */ | 5 | */ |
6 | #ifndef _SELINUX_AVC_H_ | 6 | #ifndef _SELINUX_AVC_H_ |
7 | #define _SELINUX_AVC_H_ | 7 | #define _SELINUX_AVC_H_ |
diff --git a/security/selinux/include/avc_ss.h b/security/selinux/include/avc_ss.h index d5c328452df0..37d57dadd476 100644 --- a/security/selinux/include/avc_ss.h +++ b/security/selinux/include/avc_ss.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Access vector cache interface for the security server. | 2 | * Access vector cache interface for the security server. |
3 | * | 3 | * |
4 | * Author : Stephen Smalley, <sds@epoch.ncsc.mil> | 4 | * Author : Stephen Smalley, <sds@tycho.nsa.gov> |
5 | */ | 5 | */ |
6 | #ifndef _SELINUX_AVC_SS_H_ | 6 | #ifndef _SELINUX_AVC_SS_H_ |
7 | #define _SELINUX_AVC_SS_H_ | 7 | #define _SELINUX_AVC_SS_H_ |
diff --git a/security/selinux/include/classmap.h b/security/selinux/include/classmap.h index b9fe3434b036..35ffb29a69cb 100644 --- a/security/selinux/include/classmap.h +++ b/security/selinux/include/classmap.h | |||
@@ -48,6 +48,8 @@ struct security_class_mapping secclass_map[] = { | |||
48 | "setrlimit", "rlimitinh", "dyntransition", "setcurrent", | 48 | "setrlimit", "rlimitinh", "dyntransition", "setcurrent", |
49 | "execmem", "execstack", "execheap", "setkeycreate", | 49 | "execmem", "execstack", "execheap", "setkeycreate", |
50 | "setsockcreate", "getrlimit", NULL } }, | 50 | "setsockcreate", "getrlimit", NULL } }, |
51 | { "process2", | ||
52 | { "nnp_transition", "nosuid_transition", NULL } }, | ||
51 | { "system", | 53 | { "system", |
52 | { "ipc_info", "syslog_read", "syslog_mod", | 54 | { "ipc_info", "syslog_read", "syslog_mod", |
53 | "syslog_console", "module_request", "module_load", NULL } }, | 55 | "syslog_console", "module_request", "module_load", NULL } }, |
diff --git a/security/selinux/include/objsec.h b/security/selinux/include/objsec.h index 6ebc61e370ff..1649cd18eb0b 100644 --- a/security/selinux/include/objsec.h +++ b/security/selinux/include/objsec.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * This file contains the SELinux security data structures for kernel objects. | 4 | * This file contains the SELinux security data structures for kernel objects. |
5 | * | 5 | * |
6 | * Author(s): Stephen Smalley, <sds@epoch.ncsc.mil> | 6 | * Author(s): Stephen Smalley, <sds@tycho.nsa.gov> |
7 | * Chris Vance, <cvance@nai.com> | 7 | * Chris Vance, <cvance@nai.com> |
8 | * Wayne Salamon, <wsalamon@nai.com> | 8 | * Wayne Salamon, <wsalamon@nai.com> |
9 | * James Morris <jmorris@redhat.com> | 9 | * James Morris <jmorris@redhat.com> |
diff --git a/security/selinux/include/security.h b/security/selinux/include/security.h index e91f08c16c0b..28dfb2f93e4d 100644 --- a/security/selinux/include/security.h +++ b/security/selinux/include/security.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Security server interface. | 2 | * Security server interface. |
3 | * | 3 | * |
4 | * Author : Stephen Smalley, <sds@epoch.ncsc.mil> | 4 | * Author : Stephen Smalley, <sds@tycho.nsa.gov> |
5 | * | 5 | * |
6 | */ | 6 | */ |
7 | 7 | ||
@@ -73,6 +73,7 @@ enum { | |||
73 | POLICYDB_CAPABILITY_EXTSOCKCLASS, | 73 | POLICYDB_CAPABILITY_EXTSOCKCLASS, |
74 | POLICYDB_CAPABILITY_ALWAYSNETWORK, | 74 | POLICYDB_CAPABILITY_ALWAYSNETWORK, |
75 | POLICYDB_CAPABILITY_CGROUPSECLABEL, | 75 | POLICYDB_CAPABILITY_CGROUPSECLABEL, |
76 | POLICYDB_CAPABILITY_NNP_NOSUID_TRANSITION, | ||
76 | __POLICYDB_CAPABILITY_MAX | 77 | __POLICYDB_CAPABILITY_MAX |
77 | }; | 78 | }; |
78 | #define POLICYDB_CAPABILITY_MAX (__POLICYDB_CAPABILITY_MAX - 1) | 79 | #define POLICYDB_CAPABILITY_MAX (__POLICYDB_CAPABILITY_MAX - 1) |
@@ -84,6 +85,7 @@ extern int selinux_policycap_openperm; | |||
84 | extern int selinux_policycap_extsockclass; | 85 | extern int selinux_policycap_extsockclass; |
85 | extern int selinux_policycap_alwaysnetwork; | 86 | extern int selinux_policycap_alwaysnetwork; |
86 | extern int selinux_policycap_cgroupseclabel; | 87 | extern int selinux_policycap_cgroupseclabel; |
88 | extern int selinux_policycap_nnp_nosuid_transition; | ||
87 | 89 | ||
88 | /* | 90 | /* |
89 | * type_datum properties | 91 | * type_datum properties |
diff --git a/security/selinux/ss/avtab.c b/security/selinux/ss/avtab.c index 3628d3a868b6..2c3c7d010d8a 100644 --- a/security/selinux/ss/avtab.c +++ b/security/selinux/ss/avtab.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Implementation of the access vector table type. | 2 | * Implementation of the access vector table type. |
3 | * | 3 | * |
4 | * Author : Stephen Smalley, <sds@epoch.ncsc.mil> | 4 | * Author : Stephen Smalley, <sds@tycho.nsa.gov> |
5 | */ | 5 | */ |
6 | 6 | ||
7 | /* Updated: Frank Mayer <mayerf@tresys.com> and Karl MacMillan <kmacmillan@tresys.com> | 7 | /* Updated: Frank Mayer <mayerf@tresys.com> and Karl MacMillan <kmacmillan@tresys.com> |
diff --git a/security/selinux/ss/avtab.h b/security/selinux/ss/avtab.h index d946c9dc3c9c..725853cadc42 100644 --- a/security/selinux/ss/avtab.h +++ b/security/selinux/ss/avtab.h | |||
@@ -5,7 +5,7 @@ | |||
5 | * table is used to represent the type enforcement | 5 | * table is used to represent the type enforcement |
6 | * tables. | 6 | * tables. |
7 | * | 7 | * |
8 | * Author : Stephen Smalley, <sds@epoch.ncsc.mil> | 8 | * Author : Stephen Smalley, <sds@tycho.nsa.gov> |
9 | */ | 9 | */ |
10 | 10 | ||
11 | /* Updated: Frank Mayer <mayerf@tresys.com> and Karl MacMillan <kmacmillan@tresys.com> | 11 | /* Updated: Frank Mayer <mayerf@tresys.com> and Karl MacMillan <kmacmillan@tresys.com> |
diff --git a/security/selinux/ss/constraint.h b/security/selinux/ss/constraint.h index 96fd947c494b..33ae2aec4f36 100644 --- a/security/selinux/ss/constraint.h +++ b/security/selinux/ss/constraint.h | |||
@@ -10,7 +10,7 @@ | |||
10 | * process from labeling an object with a different user | 10 | * process from labeling an object with a different user |
11 | * identity. | 11 | * identity. |
12 | * | 12 | * |
13 | * Author : Stephen Smalley, <sds@epoch.ncsc.mil> | 13 | * Author : Stephen Smalley, <sds@tycho.nsa.gov> |
14 | */ | 14 | */ |
15 | #ifndef _SS_CONSTRAINT_H_ | 15 | #ifndef _SS_CONSTRAINT_H_ |
16 | #define _SS_CONSTRAINT_H_ | 16 | #define _SS_CONSTRAINT_H_ |
diff --git a/security/selinux/ss/context.h b/security/selinux/ss/context.h index 212e3479a0d9..a2c0f37c42ae 100644 --- a/security/selinux/ss/context.h +++ b/security/selinux/ss/context.h | |||
@@ -10,7 +10,7 @@ | |||
10 | * security server and can be changed without affecting | 10 | * security server and can be changed without affecting |
11 | * clients of the security server. | 11 | * clients of the security server. |
12 | * | 12 | * |
13 | * Author : Stephen Smalley, <sds@epoch.ncsc.mil> | 13 | * Author : Stephen Smalley, <sds@tycho.nsa.gov> |
14 | */ | 14 | */ |
15 | #ifndef _SS_CONTEXT_H_ | 15 | #ifndef _SS_CONTEXT_H_ |
16 | #define _SS_CONTEXT_H_ | 16 | #define _SS_CONTEXT_H_ |
diff --git a/security/selinux/ss/ebitmap.c b/security/selinux/ss/ebitmap.c index ad38299164c3..fc28149a4f2e 100644 --- a/security/selinux/ss/ebitmap.c +++ b/security/selinux/ss/ebitmap.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Implementation of the extensible bitmap type. | 2 | * Implementation of the extensible bitmap type. |
3 | * | 3 | * |
4 | * Author : Stephen Smalley, <sds@epoch.ncsc.mil> | 4 | * Author : Stephen Smalley, <sds@tycho.nsa.gov> |
5 | */ | 5 | */ |
6 | /* | 6 | /* |
7 | * Updated: Hewlett-Packard <paul@paul-moore.com> | 7 | * Updated: Hewlett-Packard <paul@paul-moore.com> |
diff --git a/security/selinux/ss/ebitmap.h b/security/selinux/ss/ebitmap.h index 6d5a9ac4251f..da1325dda550 100644 --- a/security/selinux/ss/ebitmap.h +++ b/security/selinux/ss/ebitmap.h | |||
@@ -9,7 +9,7 @@ | |||
9 | * an explicitly specified starting bit position within | 9 | * an explicitly specified starting bit position within |
10 | * the total bitmap. | 10 | * the total bitmap. |
11 | * | 11 | * |
12 | * Author : Stephen Smalley, <sds@epoch.ncsc.mil> | 12 | * Author : Stephen Smalley, <sds@tycho.nsa.gov> |
13 | */ | 13 | */ |
14 | #ifndef _SS_EBITMAP_H_ | 14 | #ifndef _SS_EBITMAP_H_ |
15 | #define _SS_EBITMAP_H_ | 15 | #define _SS_EBITMAP_H_ |
diff --git a/security/selinux/ss/hashtab.c b/security/selinux/ss/hashtab.c index 3858706a29fb..686c3917064c 100644 --- a/security/selinux/ss/hashtab.c +++ b/security/selinux/ss/hashtab.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Implementation of the hash table type. | 2 | * Implementation of the hash table type. |
3 | * | 3 | * |
4 | * Author : Stephen Smalley, <sds@epoch.ncsc.mil> | 4 | * Author : Stephen Smalley, <sds@tycho.nsa.gov> |
5 | */ | 5 | */ |
6 | #include <linux/kernel.h> | 6 | #include <linux/kernel.h> |
7 | #include <linux/slab.h> | 7 | #include <linux/slab.h> |
diff --git a/security/selinux/ss/hashtab.h b/security/selinux/ss/hashtab.h index 953872cd84ab..009fb5e06172 100644 --- a/security/selinux/ss/hashtab.h +++ b/security/selinux/ss/hashtab.h | |||
@@ -5,7 +5,7 @@ | |||
5 | * functions for hash computation and key comparison are | 5 | * functions for hash computation and key comparison are |
6 | * provided by the creator of the table. | 6 | * provided by the creator of the table. |
7 | * | 7 | * |
8 | * Author : Stephen Smalley, <sds@epoch.ncsc.mil> | 8 | * Author : Stephen Smalley, <sds@tycho.nsa.gov> |
9 | */ | 9 | */ |
10 | #ifndef _SS_HASHTAB_H_ | 10 | #ifndef _SS_HASHTAB_H_ |
11 | #define _SS_HASHTAB_H_ | 11 | #define _SS_HASHTAB_H_ |
diff --git a/security/selinux/ss/mls.c b/security/selinux/ss/mls.c index e1088842232c..d9dc34f4fade 100644 --- a/security/selinux/ss/mls.c +++ b/security/selinux/ss/mls.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Implementation of the multi-level security (MLS) policy. | 2 | * Implementation of the multi-level security (MLS) policy. |
3 | * | 3 | * |
4 | * Author : Stephen Smalley, <sds@epoch.ncsc.mil> | 4 | * Author : Stephen Smalley, <sds@tycho.nsa.gov> |
5 | */ | 5 | */ |
6 | /* | 6 | /* |
7 | * Updated: Trusted Computer Solutions, Inc. <dgoeddel@trustedcs.com> | 7 | * Updated: Trusted Computer Solutions, Inc. <dgoeddel@trustedcs.com> |
diff --git a/security/selinux/ss/mls.h b/security/selinux/ss/mls.h index e4369e3e6366..0f0a1d65b2ce 100644 --- a/security/selinux/ss/mls.h +++ b/security/selinux/ss/mls.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Multi-level security (MLS) policy operations. | 2 | * Multi-level security (MLS) policy operations. |
3 | * | 3 | * |
4 | * Author : Stephen Smalley, <sds@epoch.ncsc.mil> | 4 | * Author : Stephen Smalley, <sds@tycho.nsa.gov> |
5 | */ | 5 | */ |
6 | /* | 6 | /* |
7 | * Updated: Trusted Computer Solutions, Inc. <dgoeddel@trustedcs.com> | 7 | * Updated: Trusted Computer Solutions, Inc. <dgoeddel@trustedcs.com> |
diff --git a/security/selinux/ss/mls_types.h b/security/selinux/ss/mls_types.h index e93648774137..47f3702cd596 100644 --- a/security/selinux/ss/mls_types.h +++ b/security/selinux/ss/mls_types.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Type definitions for the multi-level security (MLS) policy. | 2 | * Type definitions for the multi-level security (MLS) policy. |
3 | * | 3 | * |
4 | * Author : Stephen Smalley, <sds@epoch.ncsc.mil> | 4 | * Author : Stephen Smalley, <sds@tycho.nsa.gov> |
5 | */ | 5 | */ |
6 | /* | 6 | /* |
7 | * Updated: Trusted Computer Solutions, Inc. <dgoeddel@trustedcs.com> | 7 | * Updated: Trusted Computer Solutions, Inc. <dgoeddel@trustedcs.com> |
diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c index aa6500abb178..6e8c8056d7ad 100644 --- a/security/selinux/ss/policydb.c +++ b/security/selinux/ss/policydb.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Implementation of the policy database. | 2 | * Implementation of the policy database. |
3 | * | 3 | * |
4 | * Author : Stephen Smalley, <sds@epoch.ncsc.mil> | 4 | * Author : Stephen Smalley, <sds@tycho.nsa.gov> |
5 | */ | 5 | */ |
6 | 6 | ||
7 | /* | 7 | /* |
diff --git a/security/selinux/ss/policydb.h b/security/selinux/ss/policydb.h index 5d23eed35fa7..215f8f30ac5a 100644 --- a/security/selinux/ss/policydb.h +++ b/security/selinux/ss/policydb.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * A policy database (policydb) specifies the | 2 | * A policy database (policydb) specifies the |
3 | * configuration data for the security policy. | 3 | * configuration data for the security policy. |
4 | * | 4 | * |
5 | * Author : Stephen Smalley, <sds@epoch.ncsc.mil> | 5 | * Author : Stephen Smalley, <sds@tycho.nsa.gov> |
6 | */ | 6 | */ |
7 | 7 | ||
8 | /* | 8 | /* |
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c index 2f02fa67ec2e..e4a1c0dc561a 100644 --- a/security/selinux/ss/services.c +++ b/security/selinux/ss/services.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Implementation of the security services. | 2 | * Implementation of the security services. |
3 | * | 3 | * |
4 | * Authors : Stephen Smalley, <sds@epoch.ncsc.mil> | 4 | * Authors : Stephen Smalley, <sds@tycho.nsa.gov> |
5 | * James Morris <jmorris@redhat.com> | 5 | * James Morris <jmorris@redhat.com> |
6 | * | 6 | * |
7 | * Updated: Trusted Computer Solutions, Inc. <dgoeddel@trustedcs.com> | 7 | * Updated: Trusted Computer Solutions, Inc. <dgoeddel@trustedcs.com> |
@@ -76,7 +76,8 @@ char *selinux_policycap_names[__POLICYDB_CAPABILITY_MAX] = { | |||
76 | "open_perms", | 76 | "open_perms", |
77 | "extended_socket_class", | 77 | "extended_socket_class", |
78 | "always_check_network", | 78 | "always_check_network", |
79 | "cgroup_seclabel" | 79 | "cgroup_seclabel", |
80 | "nnp_nosuid_transition" | ||
80 | }; | 81 | }; |
81 | 82 | ||
82 | int selinux_policycap_netpeer; | 83 | int selinux_policycap_netpeer; |
@@ -84,6 +85,7 @@ int selinux_policycap_openperm; | |||
84 | int selinux_policycap_extsockclass; | 85 | int selinux_policycap_extsockclass; |
85 | int selinux_policycap_alwaysnetwork; | 86 | int selinux_policycap_alwaysnetwork; |
86 | int selinux_policycap_cgroupseclabel; | 87 | int selinux_policycap_cgroupseclabel; |
88 | int selinux_policycap_nnp_nosuid_transition; | ||
87 | 89 | ||
88 | static DEFINE_RWLOCK(policy_rwlock); | 90 | static DEFINE_RWLOCK(policy_rwlock); |
89 | 91 | ||
@@ -2009,6 +2011,9 @@ static void security_load_policycaps(void) | |||
2009 | selinux_policycap_cgroupseclabel = | 2011 | selinux_policycap_cgroupseclabel = |
2010 | ebitmap_get_bit(&policydb.policycaps, | 2012 | ebitmap_get_bit(&policydb.policycaps, |
2011 | POLICYDB_CAPABILITY_CGROUPSECLABEL); | 2013 | POLICYDB_CAPABILITY_CGROUPSECLABEL); |
2014 | selinux_policycap_nnp_nosuid_transition = | ||
2015 | ebitmap_get_bit(&policydb.policycaps, | ||
2016 | POLICYDB_CAPABILITY_NNP_NOSUID_TRANSITION); | ||
2012 | 2017 | ||
2013 | for (i = 0; i < ARRAY_SIZE(selinux_policycap_names); i++) | 2018 | for (i = 0; i < ARRAY_SIZE(selinux_policycap_names); i++) |
2014 | pr_info("SELinux: policy capability %s=%d\n", | 2019 | pr_info("SELinux: policy capability %s=%d\n", |
diff --git a/security/selinux/ss/services.h b/security/selinux/ss/services.h index 6abcd8729ec3..3d9fa9556b4f 100644 --- a/security/selinux/ss/services.h +++ b/security/selinux/ss/services.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Implementation of the security services. | 2 | * Implementation of the security services. |
3 | * | 3 | * |
4 | * Author : Stephen Smalley, <sds@epoch.ncsc.mil> | 4 | * Author : Stephen Smalley, <sds@tycho.nsa.gov> |
5 | */ | 5 | */ |
6 | #ifndef _SS_SERVICES_H_ | 6 | #ifndef _SS_SERVICES_H_ |
7 | #define _SS_SERVICES_H_ | 7 | #define _SS_SERVICES_H_ |
diff --git a/security/selinux/ss/sidtab.c b/security/selinux/ss/sidtab.c index c5f436b15d19..6ae08efc5ae7 100644 --- a/security/selinux/ss/sidtab.c +++ b/security/selinux/ss/sidtab.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Implementation of the SID table type. | 2 | * Implementation of the SID table type. |
3 | * | 3 | * |
4 | * Author : Stephen Smalley, <sds@epoch.ncsc.mil> | 4 | * Author : Stephen Smalley, <sds@tycho.nsa.gov> |
5 | */ | 5 | */ |
6 | #include <linux/kernel.h> | 6 | #include <linux/kernel.h> |
7 | #include <linux/slab.h> | 7 | #include <linux/slab.h> |
diff --git a/security/selinux/ss/sidtab.h b/security/selinux/ss/sidtab.h index 84dc154d9389..de5d0ea583d2 100644 --- a/security/selinux/ss/sidtab.h +++ b/security/selinux/ss/sidtab.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * A security identifier table (sidtab) is a hash table | 2 | * A security identifier table (sidtab) is a hash table |
3 | * of security context structures indexed by SID value. | 3 | * of security context structures indexed by SID value. |
4 | * | 4 | * |
5 | * Author : Stephen Smalley, <sds@epoch.ncsc.mil> | 5 | * Author : Stephen Smalley, <sds@tycho.nsa.gov> |
6 | */ | 6 | */ |
7 | #ifndef _SS_SIDTAB_H_ | 7 | #ifndef _SS_SIDTAB_H_ |
8 | #define _SS_SIDTAB_H_ | 8 | #define _SS_SIDTAB_H_ |
diff --git a/security/selinux/ss/symtab.c b/security/selinux/ss/symtab.c index 160326ee99e5..d1a6745849a7 100644 --- a/security/selinux/ss/symtab.c +++ b/security/selinux/ss/symtab.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Implementation of the symbol table type. | 2 | * Implementation of the symbol table type. |
3 | * | 3 | * |
4 | * Author : Stephen Smalley, <sds@epoch.ncsc.mil> | 4 | * Author : Stephen Smalley, <sds@tycho.nsa.gov> |
5 | */ | 5 | */ |
6 | #include <linux/kernel.h> | 6 | #include <linux/kernel.h> |
7 | #include <linux/string.h> | 7 | #include <linux/string.h> |
diff --git a/security/selinux/ss/symtab.h b/security/selinux/ss/symtab.h index ca422b42fbc0..0bc12d587d3a 100644 --- a/security/selinux/ss/symtab.h +++ b/security/selinux/ss/symtab.h | |||
@@ -4,7 +4,7 @@ | |||
4 | * is arbitrary. The symbol table type is implemented | 4 | * is arbitrary. The symbol table type is implemented |
5 | * using the hash table type (hashtab). | 5 | * using the hash table type (hashtab). |
6 | * | 6 | * |
7 | * Author : Stephen Smalley, <sds@epoch.ncsc.mil> | 7 | * Author : Stephen Smalley, <sds@tycho.nsa.gov> |
8 | */ | 8 | */ |
9 | #ifndef _SS_SYMTAB_H_ | 9 | #ifndef _SS_SYMTAB_H_ |
10 | #define _SS_SYMTAB_H_ | 10 | #define _SS_SYMTAB_H_ |