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]
Message-ID:
 <PAXPR83MB055933D7638738717A5771D4B4D42@PAXPR83MB0559.EURPRD83.prod.outlook.com>
Date: Mon, 24 Jun 2024 10:18:13 +0000
From: Konstantin Taranov <kotaranov@...rosoft.com>
To: Sai Krishna Gajula <saikrishnag@...vell.com>, Ma Ke <make24@...as.ac.cn>,
	KY Srinivasan <kys@...rosoft.com>, Haiyang Zhang <haiyangz@...rosoft.com>,
	"wei.liu@...nel.org" <wei.liu@...nel.org>, Dexuan Cui <decui@...rosoft.com>,
	"davem@...emloft.net" <davem@...emloft.net>, "edumazet@...gle.com"
	<edumazet@...gle.com>, "kuba@...nel.org" <kuba@...nel.org>,
	"pabeni@...hat.com" <pabeni@...hat.com>, "shradhagupta@...ux.microsoft.com"
	<shradhagupta@...ux.microsoft.com>, "horms@...nel.org" <horms@...nel.org>,
	"linyunsheng@...wei.com" <linyunsheng@...wei.com>,
	"schakrabarti@...ux.microsoft.com" <schakrabarti@...ux.microsoft.com>,
	"erick.archer@...look.com" <erick.archer@...look.com>
CC: "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] net: mana: Fix possible double free in error handling
 path

> > -     kfree(madev);
> I think you can just avoid using add_fail and keep/retain rest of init_fail, idx_fail
> conditions in old way right?

I do agree with Sai. I think the patch can be just:
@@ -2797,7 +2797,8 @@ static int add_adev(struct gdma_dev *gd)
        ret = auxiliary_device_init(adev);
        if (ret)
                goto init_fail;
-
+       /* madev is owned by the auxiliary device */
+       madev = NULL;
        ret = auxiliary_device_add(adev);
        if (ret)
                goto add_fail;


- Konstantin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ