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] [day] [month] [year] [list]
Date:	Tue, 10 Mar 2015 13:32:34 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	khc@...waw.pl
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH] Fix IXP4xx Ethernet RX with both IFF_ALLMULTI and
 IFF_PROMISC.

From: Krzysztof Halasa <khc@...waw.pl>
Date: Mon, 09 Mar 2015 23:07:28 +0100

> This long standing bug caused IFF_PROMISC to be ignored when
> IFF_ALLMULTI was requested.
> 
> Also, without any multicast address configured, the driver will use
> device MAC address for the multicast filter, instead of accepting all
> inbound traffic.
> 
> Signed-off-by: Krzysztof Haİİasa <khc@...waw.pl>

One big consequence of not basing your patches on the correct tree, is
that you don't even notice when the bug you are fixing is already
fixed (whether partially or fully).

Please see:

commit f81edc6ac1e1e2e2cbe98bcd6ef5ebb7afb00807
Author: Derrick Pallas <pallas@...aki.com>
Date:   Wed Feb 18 00:50:25 2015 -0800

    ethernet/ixp4xx: prevent allmulti from clobbering promisc
    
    If both promisc and allmulti are set, promisc should trump allmulti and
    disable the MAC filter; otherwise, the interface is not really promisc.
    
    Previously, this code checked IFF_ALLMULTI prior to and without regard for
    IFF_PROMISC; if both were set, only multicast and direct unicast traffic
    would make it through the filter.
    
    Signed-off-by: Derrick Pallas <pallas@...aki.com>
    Signed-off-by: David S. Miller <davem@...emloft.net>

diff --git a/drivers/net/ethernet/xscale/ixp4xx_eth.c b/drivers/net/ethernet/xscale/ixp4xx_eth.c
index f7e0f0f..9e16a28 100644
--- a/drivers/net/ethernet/xscale/ixp4xx_eth.c
+++ b/drivers/net/ethernet/xscale/ixp4xx_eth.c
@@ -938,7 +938,7 @@ static void eth_set_mcast_list(struct net_device *dev)
 	int i;
 	static const u8 allmulti[] = { 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 };
 
-	if (dev->flags & IFF_ALLMULTI) {
+	if ((dev->flags & IFF_ALLMULTI) && !(dev->flags & IFF_PROMISC)) {
 		for (i = 0; i < ETH_ALEN; i++) {
 			__raw_writel(allmulti[i], &port->regs->mcast_addr[i]);
 			__raw_writel(allmulti[i], &port->regs->mcast_mask[i]);
--
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