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]
Date:	Mon, 7 Oct 2013 14:43:19 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	Chen Gang <gang.chen@...anux.com>
Cc:	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Serge Hallyn <serge.hallyn@...onical.com>,
	"Serge E. Hallyn" <serge@...lyn.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] kernel/pid.c: check pid whether be NULL in
	__change_pid()

On 10/07, Chen Gang wrote:
>
> Within __change_pid(), 'new' may be NULL if it comes from detach_pid(),
> and 'link->pid' also may be NULL ("link->pid = new"), so theoretically,\
> the original 'link->pid' may be NULL, too.

I don't really understand this "theoretically",

> In real world, at least now, all callers which will call detach_pid()
> or change_pid() will not cause issue,

Yes,

> but still recommend to check it
> in __change_pid() to let itself consistency.

Why?

Contrary, I think we should not hide the problem. If __change_pid() is
called when task->pids[type].pid is already NULL there is something
seriously wrong.

Oleg.

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