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]
Message-ID: <CO6PR18MB40835482AA82B3A34FCAA165C4A81@CO6PR18MB4083.namprd18.prod.outlook.com>
Date:   Thu, 14 Jan 2021 21:46:55 +0000
From:   "Taras Chornyi [C]" <tchornyi@...vell.com>
To:     Vladimir Oltean <olteanv@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC:     Florian Fainelli <f.fainelli@...il.com>,
        Kurt Kanzenbach <kurt@...utronix.de>,
        "Vadym Kochan [C]" <vkochan@...vell.com>,
        Ido Schimmel <idosch@...dia.com>,
        "clang-built-linux@...glegroups.com" 
        <clang-built-linux@...glegroups.com>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "kbuild-all@...ts.01.org" <kbuild-all@...ts.01.org>
Subject: Re: [PATCH net-next] net: marvell: prestera: fix uninitialized vid in
 prestera_port_vlans_add



________________________________________
From: Vladimir Oltean <olteanv@...il.com>
Sent: Thursday, January 14, 2021 10:35 AM
To: David S. Miller; Jakub Kicinski; netdev@...r.kernel.org
Cc: Florian Fainelli; Kurt Kanzenbach; Vadym Kochan [C]; Taras Chornyi [C]; Ido Schimmel; clang-built-linux@...glegroups.com; linux-mm@...ck.org; kbuild-all@...ts.01.org
Subject:  [PATCH net-next] net: marvell: prestera: fix uninitialized vid in prestera_port_vlans_add
----------------------------------------------------------------------
From: Vladimir Oltean <vladimir.oltean@....com>

prestera_bridge_port_vlan_add should have been called with vlan->vid,
however this was masked by the presence of the local vid variable and I
did not notice the build warning.

Reported-by: kernel test robot <lkp@...el.com>
Fixes: b7a9e0da2d1c ("net: switchdev: remove vid_begin -> vid_end range from VLAN objects")
Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>
---
 drivers/net/ethernet/marvell/prestera/prestera_switchdev.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/marvell/prestera/prestera_switchdev.c b/drivers/net/ethernet/marvell/prestera/prestera_switchdev.c
index beb6447fbe40..8c2b03151736 100644
--- a/drivers/net/ethernet/marvell/prestera/prestera_switchdev.c
+++ b/drivers/net/ethernet/marvell/prestera/prestera_switchdev.c
@@ -1007,7 +1007,6 @@ static int prestera_port_vlans_add(struct prestera_port *port,
        struct prestera_bridge_port *br_port;
        struct prestera_switch *sw = port->sw;
        struct prestera_bridge *bridge;
-       u16 vid;

        if (netif_is_bridge_master(dev))
                return 0;
@@ -1021,7 +1020,7 @@ static int prestera_port_vlans_add(struct prestera_port *port,
                return 0;

        return prestera_bridge_port_vlan_add(port, br_port,
-                                            vid, flag_untagged,
+                                            vlan->vid, flag_untagged,
                                             flag_pvid, extack);
 }

--
2.25.1

Reviewed-by: Taras Chornyi <tchornyi@...vell.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ