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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201022054233.17326-1-dinghao.liu@zju.edu.cn>
Date:   Thu, 22 Oct 2020 13:42:33 +0800
From:   Dinghao Liu <dinghao.liu@....edu.cn>
To:     dinghao.liu@....edu.cn, kjlu@....edu
Cc:     "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH] net-veth: Fix memleak in veth_newlink

When rtnl_configure_link() fails, peer needs to be
freed just like when register_netdevice() fails.

Signed-off-by: Dinghao Liu <dinghao.liu@....edu.cn>
---
 drivers/net/veth.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/veth.c b/drivers/net/veth.c
index 8c737668008a..6c68094399cc 100644
--- a/drivers/net/veth.c
+++ b/drivers/net/veth.c
@@ -1405,8 +1405,6 @@ static int veth_newlink(struct net *src_net, struct net_device *dev,
 	/* nothing to do */
 err_configure_peer:
 	unregister_netdevice(peer);
-	return err;
-
 err_register_peer:
 	free_netdev(peer);
 	return err;
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ