Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'selinux-pr-20181115' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux

Pull SELinux fixes from Paul Moore:
"Two small SELinux fixes for v4.20.

Ondrej's patch adds a check on user input, and my patch ensures we
don't look past the end of a buffer.

Both patches are quite small and pass the selinux-testsuite"

* tag 'selinux-pr-20181115' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux:
selinux: fix non-MLS handling in mls_context_to_sid()
selinux: check length properly in SCTP bind hook

+10 -3
+3
security/selinux/hooks.c
··· 5318 5318 addr_buf = address; 5319 5319 5320 5320 while (walk_size < addrlen) { 5321 + if (walk_size + sizeof(sa_family_t) > addrlen) 5322 + return -EINVAL; 5323 + 5321 5324 addr = addr_buf; 5322 5325 switch (addr->sa_family) { 5323 5326 case AF_UNSPEC:
+7 -3
security/selinux/ss/mls.c
··· 245 245 char *rangep[2]; 246 246 247 247 if (!pol->mls_enabled) { 248 - if ((def_sid != SECSID_NULL && oldc) || (*scontext) == '\0') 249 - return 0; 250 - return -EINVAL; 248 + /* 249 + * With no MLS, only return -EINVAL if there is a MLS field 250 + * and it did not come from an xattr. 251 + */ 252 + if (oldc && def_sid == SECSID_NULL) 253 + return -EINVAL; 254 + return 0; 251 255 } 252 256 253 257 /*