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: <MW5PR11MB5810329D2D44A188239D3093A3D02@MW5PR11MB5810.namprd11.prod.outlook.com>
Date: Wed, 12 Mar 2025 19:32:09 +0000
From: "Korenblit, Miriam Rachel" <miriam.rachel.korenblit@...el.com>
To: Markus Elfring <Markus.Elfring@....de>, Dan Carpenter
	<dan.carpenter@...aro.org>, "linux-wireless@...r.kernel.org"
	<linux-wireless@...r.kernel.org>
CC: "kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>, LKML
	<linux-kernel@...r.kernel.org>, "Anjaneyulu, Pagadala Yesu"
	<pagadala.yesu.anjaneyulu@...el.com>, "Stern, Avraham"
	<avraham.stern@...el.com>, "Gabay, Daniel" <daniel.gabay@...el.com>,
	"Grumbach, Emmanuel" <emmanuel.grumbach@...el.com>, Jeff Johnson
	<jeff.johnson@....qualcomm.com>, "Berg, Johannes" <johannes.berg@...el.com>,
	"Ben Shimol, Yedidya" <yedidya.ben.shimol@...el.com>
Subject: RE: [PATCH] wifi: iwlwifi: Fix uninitialized variable with __free()



> -----Original Message-----
> From: Markus Elfring <Markus.Elfring@....de>
> Sent: Wednesday, 12 March 2025 17:42
> To: Dan Carpenter <dan.carpenter@...aro.org>; linux-wireless@...r.kernel.org
> Cc: kernel-janitors@...r.kernel.org; LKML <linux-kernel@...r.kernel.org>;
> Anjaneyulu, Pagadala Yesu <pagadala.yesu.anjaneyulu@...el.com>; Stern,
> Avraham <avraham.stern@...el.com>; Gabay, Daniel <daniel.gabay@...el.com>;
> Grumbach, Emmanuel <emmanuel.grumbach@...el.com>; Jeff Johnson
> <jeff.johnson@....qualcomm.com>; Berg, Johannes <johannes.berg@...el.com>;
> Korenblit, Miriam Rachel <miriam.rachel.korenblit@...el.com>; Ben Shimol,
> Yedidya <yedidya.ben.shimol@...el.com>
> Subject: Re: [PATCH] wifi: iwlwifi: Fix uninitialized variable with __free()
> 
> …
> > +++ b/drivers/net/wireless/intel/iwlwifi/mld/debugfs.c
> > @@ -556,8 +556,8 @@ iwl_dbgfs_vif_twt_setup_write(struct iwl_mld *mld,
> char *buf, size_t count,
> >  	};
> >  	struct ieee80211_vif *vif = data;
> >  	struct iwl_mld_vif *mld_vif = iwl_mld_vif_from_mac80211(vif);
> > +	struct iwl_dhc_cmd *cmd __free(kfree) = NULL;
> >  	struct iwl_dhc_twt_operation *dhc_twt_cmd;
> > -	struct iwl_dhc_cmd *cmd __free(kfree);
> …
> 
> Can it be recommended to reduce the scope for the affected local variable
> instead?
> https://elixir.bootlin.com/linux/v6.14-rc6/source/include/linux/cleanup.h#L129-
> L133

As said in reply to Jeff's review -
This is recommended if you have multiple __kfree variables (and the order of freeing matters)
Or if there is a guard() later in the function.
This function is not the case and will probably never be since the entire function is running under the relevant lock.

Miri

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ