summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>2009-01-04 17:27:31 -0800
committerDavid S. Miller <davem@davemloft.net>2009-01-04 17:27:31 -0800
commit914d11647b6d6fe81bdf0c059612ee36282b8cee (patch)
tree8d37925767cf7ba112a6d1ba21d3340e067c0d33
parent22604c866889c4b2e12b73cbf1683bda1b72a313 (diff)
downloadop-kernel-dev-914d11647b6d6fe81bdf0c059612ee36282b8cee.zip
op-kernel-dev-914d11647b6d6fe81bdf0c059612ee36282b8cee.tar.gz
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>
-rw-r--r--net/ipv6/ipv6_sockglue.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c
index eeeaad2..40f3246 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;
}
OpenPOWER on IntegriCloud