diff options
author | Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> | 2009-01-04 17:27:31 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-04 17:27:31 -0800 |
commit | 914d11647b6d6fe81bdf0c059612ee36282b8cee (patch) | |
tree | 8d37925767cf7ba112a6d1ba21d3340e067c0d33 /net/ipv6/ipv6_sockglue.c | |
parent | 22604c866889c4b2e12b73cbf1683bda1b72a313 (diff) | |
download | linux-914d11647b6d6fe81bdf0c059612ee36282b8cee.tar.bz2 |
ipv6: IPV6_PKTINFO relied userspace providing correct length
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Reported-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ipv6_sockglue.c')
-rw-r--r-- | net/ipv6/ipv6_sockglue.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c index eeeaad2e8b5c..40f324655e24 100644 --- a/net/ipv6/ipv6_sockglue.c +++ b/net/ipv6/ipv6_sockglue.c @@ -404,7 +404,7 @@ sticky_done: 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; } |