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
This commit is contained in:
@@ -5318,6 +5318,9 @@ static int selinux_sctp_bind_connect(struct sock *sk, int optname,
|
||||
addr_buf = address;
|
||||
|
||||
while (walk_size < addrlen) {
|
||||
if (walk_size + sizeof(sa_family_t) > addrlen)
|
||||
return -EINVAL;
|
||||
|
||||
addr = addr_buf;
|
||||
switch (addr->sa_family) {
|
||||
case AF_UNSPEC:
|
||||
|
Reference in New Issue
Block a user