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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 25 Feb 2010 09:49:15 +0100
From:	Jiri Pirko <jpirko@...hat.com>
To:	Or Gerlitz <ogerlitz@...taire.com>
Cc:	netdev@...r.kernel.org,
	Jason Gunthorpe <jgunthorpe@...idianresearch.com>,
	linux-rdma@...r.kernel.org, davem@...emloft.net
Subject: Re: [net-next-2.6 PATCH] infiniband: convert to use
	netdev_for_each_mc_addr

Thu, Feb 25, 2010 at 09:00:07AM CET, ogerlitz@...taire.com wrote:
>Jiri Pirko wrote:
>> --- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
>> +++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
>> @@ -767,11 +767,8 @@ void ipoib_mcast_dev_flush(struct net_device *dev)
>> -static int ipoib_mcast_addr_is_valid(const u8 *addr, unsigned int addrlen,
>> -				     const u8 *broadcast)
>> +static int ipoib_mcast_addr_is_valid(const u8 *addr, const u8 *broadcast)
>>  {
>> -	if (addrlen != INFINIBAND_ALEN)
>> -		return 0;
>
>This check was added by commit 5e47596b "IPoIB: Check multicast address format", may I ask what is the reason for removing it now?

Yes, at this very moment the check is not needless but it will be in a brief
future. dev_mc_add will look very similar like dev_unicast_add. But ok. Here's
patch adding the check in dev_mc_add right now to correct this state. Thanks Or.

Subject: [net-next-2.6 PATCH] net: add addr len check to dev_mc_add

Signed-off-by: Jiri Pirko <jpirko@...hat.com>

diff --git a/net/core/dev_mcast.c b/net/core/dev_mcast.c
index 9e2fa39..fd91569 100644
--- a/net/core/dev_mcast.c
+++ b/net/core/dev_mcast.c
@@ -96,6 +96,8 @@ int dev_mc_add(struct net_device *dev, void *addr, int alen, int glbl)
 	int err;
 
 	netif_addr_lock_bh(dev);
+	if (alen != dev->addr_len)
+		return -EINVAL;
 	err = __dev_addr_add(&dev->mc_list, &dev->mc_count, addr, alen, glbl);
 	if (!err)
 		__dev_set_rx_mode(dev);
--
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