Skip to content

Commit 7f85565

Browse files
committed
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.
2 parents 680352b + 0c3014f commit 7f85565

File tree

36 files changed

+117
-104
lines changed

36 files changed

+117
-104
lines changed

CREDITS

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2606,11 +2606,9 @@ E: [email protected]
26062606
D: bug fixes, documentation, minor hackery
26072607

26082608
N: Paul Moore
2609-
2610-
D: NetLabel author
2611-
S: Hewlett-Packard
2612-
S: 110 Spit Brook Road
2613-
S: Nashua, NH 03062
2609+
2610+
W: http://www.paul-moore.com
2611+
D: NetLabel, SELinux, audit
26142612

26152613
N: James Morris
26162614

Documentation/admin-guide/LSM/tomoyo.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ TOMOYO is a name-based MAC extension (LSM module) for the Linux kernel.
99

1010
LiveCD-based tutorials are available at
1111

12-
http://tomoyo.sourceforge.jp/1.7/1st-step/ubuntu10.04-live/
13-
http://tomoyo.sourceforge.jp/1.7/1st-step/centos5-live/
12+
http://tomoyo.sourceforge.jp/1.8/ubuntu12.04-live.html
13+
http://tomoyo.sourceforge.jp/1.8/centos6-live.html
1414

1515
Though these tutorials use non-LSM version of TOMOYO, they are useful for you
1616
to know what TOMOYO is.
@@ -21,35 +21,35 @@ How to enable TOMOYO?
2121
Build the kernel with ``CONFIG_SECURITY_TOMOYO=y`` and pass ``security=tomoyo`` on
2222
kernel's command line.
2323

24-
Please see http://tomoyo.sourceforge.jp/2.3/ for details.
24+
Please see http://tomoyo.osdn.jp/2.5/ for details.
2525

2626
Where is documentation?
2727
=======================
2828

2929
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 .
3131

3232
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 .
3434
Below lists are chosen from three aspects.
3535

3636
What is TOMOYO?
3737
TOMOYO Linux Overview
38-
http://sourceforge.jp/projects/tomoyo/docs/lca2009-takeda.pdf
38+
http://osdn.jp/projects/tomoyo/docs/lca2009-takeda.pdf
3939
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
4141
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
4343

4444
What can TOMOYO do?
4545
Deep inside TOMOYO Linux
46-
http://sourceforge.jp/projects/tomoyo/docs/lca2009-kumaneko.pdf
46+
http://osdn.jp/projects/tomoyo/docs/lca2009-kumaneko.pdf
4747
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
4949

5050
History of TOMOYO?
5151
Realities of Mainlining
52-
http://sourceforge.jp/projects/tomoyo/docs/lfj2008.pdf
52+
http://osdn.jp/projects/tomoyo/docs/lfj2008.pdf
5353

5454
What is future plan?
5555
====================
@@ -60,6 +60,6 @@ multiple LSM modules at the same time. We feel sorry that you have to give up
6060
SELinux/SMACK/AppArmor etc. when you want to use TOMOYO.
6161

6262
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/ .
6464
LSM version of TOMOYO is a subset of non-LSM version of TOMOYO. We are planning
6565
to port non-LSM version's functionalities to LSM versions.

MAINTAINERS

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9298,15 +9298,6 @@ F: net/*/netfilter/
92989298
F: net/netfilter/
92999299
F: net/bridge/br_netfilter*.c
93009300

9301-
NETLABEL
9302-
M: Paul Moore <[email protected]>
9303-
W: http://netlabel.sf.net
9304-
9305-
S: Maintained
9306-
F: Documentation/netlabel/
9307-
F: include/net/netlabel.h
9308-
F: net/netlabel/
9309-
93109301
NETROM NETWORK LAYER
93119302
M: Ralf Baechle <[email protected]>
93129303
@@ -9434,10 +9425,23 @@ F: net/ipv6/
94349425
F: include/net/ip*
94359426
F: arch/x86/net/*
94369427

9437-
NETWORKING [LABELED] (NetLabel, CIPSO, Labeled IPsec, SECMARK)
9428+
NETWORKING [LABELED] (NetLabel, Labeled IPsec, SECMARK)
94389429
M: Paul Moore <[email protected]>
9430+
W: https://github.com/netlabel
94399431
9432+
94409433
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
94419445

94429446
NETWORKING [TLS]
94439447
M: Ilya Lesokhin <[email protected]>
@@ -12023,8 +12027,9 @@ M: Paul Moore <[email protected]>
1202312027
M: Stephen Smalley <[email protected]>
1202412028
M: Eric Paris <[email protected]>
1202512029
L: [email protected] (moderated for non-subscribers)
12026-
W: http://selinuxproject.org
12027-
T: git git://git.infradead.org/users/pcmoore/selinux
12030+
W: https://selinuxproject.org
12031+
W: https://github.com/SELinuxProject
12032+
T: git git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux.git
1202812033
S: Supported
1202912034
F: include/linux/selinux*
1203012035
F: security/selinux/

include/linux/lsm_audit.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Author : Etienne BASSET <[email protected]>
66
*
7-
* All credits to : Stephen Smalley, <sds@epoch.ncsc.mil>
7+
* All credits to : Stephen Smalley, <sds@tycho.nsa.gov>
88
* All BUGS to : Etienne BASSET <[email protected]>
99
*/
1010
#ifndef _LSM_COMMON_LOGGING_

include/linux/lsm_hooks.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -528,11 +528,6 @@
528528
*
529529
* Security hooks for task operations.
530530
*
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.
536531
* @task_alloc:
537532
* @task task being allocated.
538533
* @clone_flags contains the flags indicating what should be shared.
@@ -1505,7 +1500,6 @@ union security_list_options {
15051500
int (*file_receive)(struct file *file);
15061501
int (*file_open)(struct file *file, const struct cred *cred);
15071502

1508-
int (*task_create)(unsigned long clone_flags);
15091503
int (*task_alloc)(struct task_struct *task, unsigned long clone_flags);
15101504
void (*task_free)(struct task_struct *task);
15111505
int (*cred_alloc_blank)(struct cred *cred, gfp_t gfp);
@@ -1779,7 +1773,6 @@ struct security_hook_heads {
17791773
struct list_head file_send_sigiotask;
17801774
struct list_head file_receive;
17811775
struct list_head file_open;
1782-
struct list_head task_create;
17831776
struct list_head task_alloc;
17841777
struct list_head task_free;
17851778
struct list_head cred_alloc_blank;

include/linux/security.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,6 @@ int security_file_send_sigiotask(struct task_struct *tsk,
318318
struct fown_struct *fown, int sig);
319319
int security_file_receive(struct file *file);
320320
int security_file_open(struct file *file, const struct cred *cred);
321-
int security_task_create(unsigned long clone_flags);
322321
int security_task_alloc(struct task_struct *task, unsigned long clone_flags);
323322
void security_task_free(struct task_struct *task);
324323
int security_cred_alloc_blank(struct cred *cred, gfp_t gfp);
@@ -880,11 +879,6 @@ static inline int security_file_open(struct file *file,
880879
return 0;
881880
}
882881

883-
static inline int security_task_create(unsigned long clone_flags)
884-
{
885-
return 0;
886-
}
887-
888882
static inline int security_task_alloc(struct task_struct *task,
889883
unsigned long clone_flags)
890884
{

kernel/fork.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1569,10 +1569,6 @@ static __latent_entropy struct task_struct *copy_process(
15691569
return ERR_PTR(-EINVAL);
15701570
}
15711571

1572-
retval = security_task_create(clone_flags);
1573-
if (retval)
1574-
goto fork_out;
1575-
15761572
retval = -ENOMEM;
15771573
p = dup_task_struct(current, node);
15781574
if (!p)

scripts/selinux/genheaders/genheaders.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,16 @@ int main(int argc, char *argv[])
129129
for (i = 0; secclass_map[i].name; i++) {
130130
struct security_class_mapping *map = &secclass_map[i];
131131
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+
}
132137
fprintf(fout, "#define %s__%s", map->name,
133138
map->perms[j]);
134139
for (k = 0; k < max(1, 40 - strlen(map->name) - strlen(map->perms[j])); k++)
135140
fprintf(fout, " ");
136-
fprintf(fout, "0x%08xUL\n", (1<<j));
141+
fprintf(fout, "0x%08xU\n", (1<<j));
137142
}
138143
}
139144

security/lsm_audit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* common LSM auditing functions
33
*
44
* Based on code written for SELinux by :
5-
* Stephen Smalley, <sds@epoch.ncsc.mil>
5+
* Stephen Smalley, <sds@tycho.nsa.gov>
66
* James Morris <[email protected]>
77
* Author : Etienne Basset, <[email protected]>
88
*

security/security.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -974,11 +974,6 @@ int security_file_open(struct file *file, const struct cred *cred)
974974
return fsnotify_perm(file, MAY_OPEN);
975975
}
976976

977-
int security_task_create(unsigned long clone_flags)
978-
{
979-
return call_int_hook(task_create, 0, clone_flags);
980-
}
981-
982977
int security_task_alloc(struct task_struct *task, unsigned long clone_flags)
983978
{
984979
return call_int_hook(task_alloc, 0, task, clone_flags);

0 commit comments

Comments
 (0)