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: <aX5VYbmg35vAw3IP@pc>
Date: Sat, 31 Jan 2026 20:17:53 +0100
From: Salah Triki <salah.triki@...il.com>
To: Trond Myklebust <trondmy@...nel.org>
Cc: Benjamin Coddington <bcodding@...merspace.com>,
	Anna Schumaker <anna@...nel.org>, linux-nfs@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] nfs: fix memory leak in nfs_sysfs_init if kset_register
 fails

On Sat, Jan 31, 2026 at 11:54:06AM -0500, Trond Myklebust wrote:
> 
> If you take a look at kset_register(), you'll see that it does free the
> kobj.name pointer if there is an error when adding the kobject.
> 
> IOW: there is no bug in the current code.

Thanks for the clarification.

You're right, kset_register() already frees kobj.name on failure, and the
kobject is not fully initialized at that point. I double-checked the
error path in kset_register(), and the current cleanup in nfs_sysfs_init()
is correct.

Apologies for the noise — I'll drop this patch.

Thanks for taking the time to explain.

Salah

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ