summaryrefslogtreecommitdiff
path: root/security/selinux/hooks.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-11-26 09:54:40 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-11-26 09:54:40 +0300
commita62d2d44902cf1222b5ac41ff1f61167a010cd6b (patch)
treefd3740b483e806c03896a59a6189e5959c899579 /security/selinux/hooks.c
parentf4b614adbf3aceaa4dab034665c379352777de39 (diff)
parent2e6e902d185027f8e3cb8b7305238f7e35d6a436 (diff)
downloadlinux-a62d2d44902cf1222b5ac41ff1f61167a010cd6b.tar.xz
Merge 4.20-rc4 into usb-next
We want the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r--security/selinux/hooks.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 7ce683259357..a67459eb62d5 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -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: