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:	Wed, 22 Aug 2007 10:08:02 -0700
From:	Randy Dunlap <randy.dunlap@...cle.com>
To:	Oleg Nesterov <oleg@...sign.ru>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Marcin Kowalczyk <qrczak@....org.pl>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] setpgid(child) fails if the child was forked by
 sub-thread

On Wed, 22 Aug 2007 20:55:39 +0400 Oleg Nesterov wrote:


so "fixes http://bugzilla.kernel.org/show_bug.cgi?id=8921"  ??


> Spotted by Marcin Kowalczyk <qrczak@....org.pl>.
> 
> sys_setpgid(child) fails if the child was forked by sub-thread.
> 
> Fix the "is it our child" check. The previous commit
> ee0acf90d320c29916ba8c5c1b2e908d81f5057d was not complete.
> 
> (this patch asks for the new same_thread_group() helper, but mainline doesn't
>  have it yet).
> 
> Signed-off-by: Oleg Nesterov <oleg@...sign.ru>
> 
> --- t/kernel/sys.c~SETPGID	2007-08-09 19:59:27.000000000 +0400
> +++ t/kernel/sys.c	2007-08-22 20:11:23.000000000 +0400
> @@ -1442,7 +1442,6 @@ asmlinkage long sys_times(struct tms __u
>   * Auch. Had to add the 'did_exec' flag to conform completely to POSIX.
>   * LBT 04.03.94
>   */
> -
>  asmlinkage long sys_setpgid(pid_t pid, pid_t pgid)
>  {
>  	struct task_struct *p;
> @@ -1470,7 +1469,7 @@ asmlinkage long sys_setpgid(pid_t pid, p
>  	if (!thread_group_leader(p))
>  		goto out;
>  
> -	if (p->real_parent == group_leader) {
> +	if (p->real_parent->tgid == group_leader->tgid) {
>  		err = -EPERM;
>  		if (task_session(p) != task_session(group_leader))
>  			goto out;
> 
> -

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
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