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-next>] [day] [month] [year] [list]
Message-Id: <1545812910-77777-1-git-send-email-peng.hao2@zte.com.cn>
Date:   Wed, 26 Dec 2018 16:28:30 +0800
From:   Peng Hao <peng.hao2@....com.cn>
To:     qiang.zhao@....com, davem@...emloft.net
Cc:     linux-kernel@...r.kernel.org, Wen Yang <wen.yang99@....com.cn>,
        netdev@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org
Subject: [PATCH] net/wan/fsl_ucc_hdlc: Avoid double free in ucc_hdlc_probe()

From: Wen Yang <wen.yang99@....com.cn>

This patch fixes potential double frees if register_hdlc_device() fails.

Signed-off-by: Wen Yang <wen.yang99@....com.cn>
Reviewed-by: Peng Hao <peng.hao2@....com.cn>
CC: Zhao Qiang <qiang.zhao@....com>
CC: "David S. Miller" <davem@...emloft.net>
CC: netdev@...r.kernel.org
CC: linuxppc-dev@...ts.ozlabs.org
CC: linux-kernel@...r.kernel.org
---
 drivers/net/wan/fsl_ucc_hdlc.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/wan/fsl_ucc_hdlc.c b/drivers/net/wan/fsl_ucc_hdlc.c
index 7a42336..839fa77 100644
--- a/drivers/net/wan/fsl_ucc_hdlc.c
+++ b/drivers/net/wan/fsl_ucc_hdlc.c
@@ -1180,7 +1180,6 @@ static int ucc_hdlc_probe(struct platform_device *pdev)
 	if (register_hdlc_device(dev)) {
 		ret = -ENOBUFS;
 		pr_err("ucc_hdlc: unable to register hdlc device\n");
-		free_netdev(dev);
 		goto free_dev;
 	}
 
-- 
2.9.5

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ