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: <20080417130252.GB6640@elte.hu>
Date:	Thu, 17 Apr 2008 15:02:53 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Oleg Nesterov <oleg@...sign.ru>
Cc:	Jesper Juhl <jesper.juhl@...il.com>, linux-kernel@...r.kernel.org,
	Pavel Emelyanov <xemul@...nvz.org>,
	"Eric W. Biederman" <ebiederm@...ssion.com>
Subject: Re: Possible mem leak in copy_process()


* Oleg Nesterov <oleg@...sign.ru> wrote:

> > 1331 		if (likely(p->pid)) {

> > 1351 		}

> > Event leaked_storage: Returned without freeing storage "pid" Also 
> > see events: [alloc_fn][var_assign][pass_arg]
> 
> this looks like a false alarm.
> 
> p->pid == pid->numbers[0].nr. If "struct pid *pid" was allocated, its 
> .nr can't be 0.
> 
> IOW, !p->pid means that pid == init_struct_pid, it wasn't allocated 
> but was passed from the caller.

should we perhaps codify this rule via adding something like this to the 
else branch:

   WARN_ON_ONCE(task_pid(p) != &init_struct_pid);

?

	Ingo
--
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