summaryrefslogtreecommitdiffstats
path: root/net/ipv6/udp.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman2019-04-21 23:18:44 +0200
committerGreg Kroah-Hartman2019-04-21 23:18:44 +0200
commit817de6b85914a3dda72b971c074d4d342965fba0 (patch)
treedf0a4563a04aadb8f8595f72392d66d65797c455 /net/ipv6/udp.c
parentstaging: kpc2000: add initial set of Daktronics drivers (diff)
parentLinux 5.1-rc6 (diff)
downloadkernel-qcow2-linux-817de6b85914a3dda72b971c074d4d342965fba0.tar.gz
kernel-qcow2-linux-817de6b85914a3dda72b971c074d4d342965fba0.tar.xz
kernel-qcow2-linux-817de6b85914a3dda72b971c074d4d342965fba0.zip
Merge 5.1-rc6 into staging-next
We want the fixes in here as well as this resolves an iio driver merge issue. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/ipv6/udp.c')
-rw-r--r--net/ipv6/udp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index b444483cdb2b..622eeaf5732b 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -1047,6 +1047,8 @@ static void udp_v6_flush_pending_frames(struct sock *sk)
static int udpv6_pre_connect(struct sock *sk, struct sockaddr *uaddr,
int addr_len)
{
+ if (addr_len < offsetofend(struct sockaddr, sa_family))
+ return -EINVAL;
/* The following checks are replicated from __ip6_datagram_connect()
* and intended to prevent BPF program called below from accessing
* bytes that are out of the bound specified by user in addr_len.