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:	Wed, 3 Mar 2010 18:52:30 +0100
From:	Jiri Pirko <jpirko@...hat.com>
To:	Jussi Kivilinna <jussi.kivilinna@...et.fi>
Cc:	netdev@...r.kernel.org, davem@...emloft.net
Subject: Re: [net-next-2.6 PATCH] wireless: convert to use
 netdev_for_each_mc_addr

Wed, Mar 03, 2010 at 05:42:56PM CET, jussi.kivilinna@...et.fi wrote:
>Hello!
>
>Quoting "Jiri Pirko" <jpirko@...hat.com>:
>
>>+	} else if (mc_count) {
>>+		int size = min(priv->multicast_size, mc_count);
>>+		int i = 0;
>>+
>>+		mc_addrs = kmalloc(size * ETH_ALEN, GFP_ATOMIC);
>...
>>+	if (filter != basefilter)
>>+		goto set_filter;
>>+
>>+	if (mc_count) {
>>+		ret = rndis_set_oid(usbdev, OID_802_3_MULTICAST_LIST, mc_addrs,
>>+				    mc_count * ETH_ALEN);
>>+		kfree(mc_addrs);
>
>mc_addrs was alloced by with 'size * ETH_ALEN', which might be less
>than mc_count * ETH_ALEN.

Actually it cannot. That's covered by:

if (mc_count > priv->multicast_size) {

This was also in the original code. In that case "size" can be eliminated and
"mc_addrs" can be allocated with "mc_count * ETH_ALEN".

Jussi are you ok with this?

Jirka
>
>Otherwise ok, and rndis_wlan works.
>
> -Jussi
>
--
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