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: <2024092530-putt-democracy-e2df@gregkh>
Date: Wed, 25 Sep 2024 14:19:12 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: Gaosheng Cui <cuigaosheng1@...wei.com>
Cc: rafael@...nel.org, akpm@...ux-foundation.org,
	thunder.leizhen@...wei.com, wangweiyang2@...wei.com,
	linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH -next 1/2] kobject: fix memory leak in kset_register()
 due to uninitialized kset->kobj.ktype

On Wed, Sep 25, 2024 at 08:07:46PM +0800, Gaosheng Cui wrote:
> If a kset with uninitialized kset->kobj.ktype be registered,

Does that happen today with any in-kernel code?  If so, let's fix those
kset instances, right?

> kset_register() will return error, and the kset.kobj.name allocated
> by kobject_set_name() will be leaked.
> 
> To mitigate this, we free the name in kset_register() when an error
> is encountered due to uninitialized kset->kobj.ktype.

How did you hit this?

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ