Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

ipv6: IPV6_PKTINFO relied userspace providing correct length

parent 22604c86
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
		}