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: <20120418141851.GG1505@arm.com>
Date:	Wed, 18 Apr 2012 15:18:52 +0100
From:	Catalin Marinas <catalin.marinas@....com>
To:	"Eric W. Biederman" <ebiederm@...ssion.com>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	majianpeng <majianpeng@...il.com>
Subject: Re: Possible memory leaks in proc_sysctl.c

On Wed, Apr 18, 2012 at 02:22:09PM +0100, Eric W. Biederman wrote:
> Catalin Marinas <catalin.marinas@....com> writes:
> > Following your commit f728019bb (sysctl: register only tables of sysctl
> > files), I get several kmemleak reports. They all seem to be header
> > allocations with kzalloc() in __register_sysctl_table() and
> > __register_sysctl_paths(). The patch isn't simple to quickly figure out
> > what may be wrong.
> 
> Due to a change in the data structure places where we register the
> sysctl permanently and ignore the result from the register_sysctl_...
> family of functions now report this leak.

But is the header (or subheader, basically any pointer inside the
kmalloc'ed object) never referenced from anywhere? I'm just trying to
understand why kmemleak reports it as it seems that the header object is
inserted in a ctl_dir.

> majianpeng has done a good of getting kmemleak_not_leak annotations into
> the net tree, and I have one of his patches pending to put into my
> sysctl tree (see below).

If the header is referenced from somewhere, we can tell kmemleak where
it is referenced from and avoid the not_leak annotations. But I'm not
familiar with this code to be sure.

Thanks.

-- 
Catalin
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ