Commit 914d1164 authored by Ilpo Järvinen's avatar Ilpo Järvinen Committed by David S. Miller

ipv6: IPV6_PKTINFO relied userspace providing correct length

Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
Reported-by: default avatarEric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 22604c86
......@@ -404,7 +404,7 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname,
else if (optlen < sizeof(struct in6_pktinfo) || optval == NULL)
goto e_inval;
if (copy_from_user(&pkt, optval, optlen)) {
if (copy_from_user(&pkt, optval, sizeof(struct in6_pktinfo))) {
retv = -EFAULT;
break;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment