Re: [stable] [064/152] driver/net/benet: fix be_cmd_multicast_set() memcpy bug

Paul Gortmaker
2011-01-07T19:39:59Z

[[stable] [064/152] driver/net/benet: fix be_cmd_multicast_set() memcpy bug] On 05/01/2011 (Wed 16:22) Greg KH wrote:

> 2.6.36-stable review patch. If anyone has any objections, please let us know.
>
> ------------------
>
>
> From: Joe Jin <joe.jin@oracle.com>
>
> [ Upstream commit 3fd40d0ceac9c234243730f4d7a6ffdb2fd3023a ]

This one should be 408cc293c29ada769ae772420a39961320da1854.

Figured I'd run reviewbot on the others and check for valid IDs.
There are a couple others that have the same issue:

0066
bridge-fix-IPv6-queries-for-bridge-multicast-snoopin.patch
should be 76d661586c8131453ba75a2e027c1f21511a893a

0072
l2tp-Fix-modalias-of-l2tp_ip.patch
should be e8d34a884e4ff118920bb57664def8a73b1b784f

0073
x25-decrement-netdev-reference-counts-on-unload.patch
should be 171995e5d82dcc92bea37a7d2a2ecc21068a0f19

0076
net-Fix-header-size-check-for-GSO-case-in-recvmsg-af.patch
should be 1f18b7176e2e41fada24584ce3c80e9abfaca52b

Thanks,
Paul.

>
> Regarding benet be_cmd_multicast_set() function, now using
> netdev_for_each_mc_addr() helper for mac address copy, but
> when copying to req->mac[] did not increase of the index.
>
> Cc: Sathya Perla <sathyap@serverengines.com>
> Cc: Subbu Seetharaman <subbus@serverengines.com>
> Cc: Sarveshwar Bandi <sarveshwarb@serverengines.com>
> Cc: Ajit Khaparde <ajitk@serverengines.com>
> Signed-off-by: Joe Jin <joe.jin@oracle.com>
> Signed-off-by: David S. Miller <davem@davemloft.net>
> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
> ---
> drivers/net/benet/be_cmds.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/drivers/net/benet/be_cmds.c
> +++ b/drivers/net/benet/be_cmds.c
> @@ -1179,7 +1179,7 @@ int be_cmd_multicast_set(struct be_adapt
>
> i = 0;
> netdev_for_each_mc_addr(ha, netdev)
> - memcpy(req->mac[i].byte, ha->addr, ETH_ALEN);
> + memcpy(req->mac[i++].byte, ha->addr, ETH_ALEN);
> } else {
> req->promiscuous = 1;
> }
>
>
> _______________________________________________
> stable mailing list
> stable@linux.kernel.org
> http://linux.kernel.org/mailman/listinfo/stable