diff options
author | Joel Stanley <joel@jms.id.au> | 2018-11-27 08:23:56 +0300 |
---|---|---|
committer | Joel Stanley <joel@jms.id.au> | 2018-11-27 08:24:09 +0300 |
commit | d608acfd4ac3fe17f3081bee8fcd4dcd896c2ffa (patch) | |
tree | ade4450a72a2e358a1d2e5cde321de0097fb291c /security/selinux/hooks.c | |
parent | 62ccc3924eff37012bd0c227d8b7dc71188fc358 (diff) | |
parent | a9da8725b7a744be3ff0ff44cab2547e4d1e6675 (diff) | |
download | linux-dev-4.18.tar.xz |
Merge tag 'v4.18.20' into dev-4.18dev-4.18
This is the 4.18.20 stable release
Signed-off-by: Joel Stanley <joel@jms.id.au>
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r-- | security/selinux/hooks.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 4680a217d0fa..46ec7be75d4b 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -5306,6 +5306,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: |