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: <20251106181328.25661cea@kernel.org>
Date: Thu, 6 Nov 2025 18:13:28 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Xuan Zhuo <xuanzhuo@...ux.alibaba.com>
Cc: netdev@...r.kernel.org, Andrew Lunn <andrew+netdev@...n.ch>, "David S. 
 Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Paolo 
 Abeni <pabeni@...hat.com>, Wen Gu <guwen@...ux.alibaba.com>, Philo Lu
 <lulie@...ux.alibaba.com>, Lorenzo Bianconi <lorenzo@...nel.org>, Vadim 
 Fedorenko <vadim.fedorenko@...ux.dev>, Lukas Bulwahn
 <lukas.bulwahn@...hat.com>, Geert Uytterhoeven <geert+renesas@...der.be>,
 Vivian Wang <wangruikang@...as.ac.cn>, Troy Mitchell
 <troy.mitchell@...ux.spacemit.com>, Dust Li <dust.li@...ux.alibaba.com>
Subject: Re: [PATCH net-next v10 3/5] eea: probe the netdevice and create
 adminq

On Fri, 7 Nov 2025 10:04:12 +0800 Xuan Zhuo wrote:
> > > +	struct eea_aq_cfg *cfg __free(kfree) = NULL;
> > > +	int err;
> > > +	u32 mtu;
> > > +
> > > +	cfg = kmalloc(sizeof(*cfg), GFP_KERNEL);
> > > +	if (!cfg)
> > > +		return -ENOMEM;
> > > +
> > > +	err = eea_adminq_query_cfg(enet, cfg);
> > > +	if (err)
> > > +		return err;  
> >
> > AFAICT this is leaking cfg  
> 
> cfg is freed by __free(kfree).

Oh, sorry, please read:
https://www.kernel.org/doc/html/next/process/maintainer-netdev.html#using-device-managed-and-cleanup-h-constructs
don't use __free() in drivers.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ