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: <BN6PR11MB189049E2D7F71CA1B47CDE56901F0@BN6PR11MB1890.namprd11.prod.outlook.com>
Date:	Fri, 12 Aug 2016 05:00:40 +0000
From:	Sudarsana Kalluru <Sudarsana.Kalluru@...gic.com>
To:	Wei Yongjun <weiyj.lk@...il.com>,
	Yuval Mintz <Yuval.Mintz@...gic.com>,
	Ariel Elior <Ariel.Elior@...gic.com>
CC:	Dept-Eng Everest Linux L2 <Dept-EngEverestLinuxL2@...gic.com>,
	netdev <netdev@...r.kernel.org>
Subject: RE: [PATCH -next] qed: Fix possible memory leak in
 qed_dcbnl_get_ieee_pfc()

Thanks for the patch.

Acked-by: Sudarsana Reddy Kalluru <sudarsana.kalluru@...gic.com>

-----Original Message-----
From: Wei Yongjun [mailto:weiyj.lk@...il.com] 
Sent: 12 August 2016 05:00
To: Yuval Mintz <Yuval.Mintz@...gic.com>; Ariel Elior <Ariel.Elior@...gic.com>; Sudarsana Kalluru <Sudarsana.Kalluru@...gic.com>
Cc: Wei Yongjun <weiyj.lk@...il.com>; Dept-Eng Everest Linux L2 <Dept-EngEverestLinuxL2@...gic.com>; netdev <netdev@...r.kernel.org>
Subject: [PATCH -next] qed: Fix possible memory leak in qed_dcbnl_get_ieee_pfc()

'dcbx_info is malloced in qed_dcbnl_get_ieee_pfc() and should be freed before leaving from the error handling cases, otherwise it will cause memory leak.

Fixes: a1d8d8a51e83 ("qed: Add dcbnl support.")
Signed-off-by: Wei Yongjun <weiyj.lk@...il.com>
---
 drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/qlogic/qed/qed_dcbx.c b/drivers/net/ethernet/qlogic/qed/qed_dcbx.c
index 226cb08..b900dfb 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_dcbx.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_dcbx.c
@@ -1968,6 +1968,7 @@ static int qed_dcbnl_get_ieee_pfc(struct qed_dev *cdev,
 
 	if (!dcbx_info->operational.ieee) {
 		DP_INFO(hwfn, "DCBX is not enabled/operational in IEEE mode\n");
+		kfree(dcbx_info);
 		return -EINVAL;
 	}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ