lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 10 Jun 2008 15:51:19 +0800
From:	Shan Wei <shanwei@...fujitsu.com>
To:	YOSHIFUJI Hideaki / 吉藤英明 
	<yoshfuji@...ux-ipv6.org>, netdev@...r.kernel.org
CC:	davem@...emloft.net
Subject: [RFC][PATCH 2/3] IPv6:Check IPV6_MULTICAST_LOOP option value

RFC3493 says, IPV6_MULTICAST_LOOP option can only be set with o or 1.
when other valuse are set, the kernel should return an error of EINVAL.

In addition, the option should not be uesd by SOCK_STREAM type, same as
IPV6_MULTICAST_IF, IPV6_MULTICAST_HOPS.
  
But the kernel doesn't check them.

Signed-off-by: Shan Wei<shanwei@...fujitsu.com>
---
 net/ipv6/ipv6_sockglue.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c
index 26b83e5..3b45def 100644
--- a/net/ipv6/ipv6_sockglue.c
+++ b/net/ipv6/ipv6_sockglue.c
@@ -456,8 +456,12 @@ done:
 		break;
 
 	case IPV6_MULTICAST_LOOP:
+		if (sk->sk_type == SOCK_STREAM)
+			goto e_inval;
 		if (optlen < sizeof(int))
 			goto e_inval;
+		if (val > 1 || val < 0)
+			goto e_inval;
 		np->mc_loop = valbool;
 		retv = 0;
 		break;
-- 


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ