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]
Date:	Fri, 20 Feb 2009 20:13:21 +0100
From:	Oleg Nesterov <oleg@...hat.com>
To:	Roland McGrath <roland@...hat.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Jerome Marchand <jmarchan@...hat.com>,
	Denys Vlasenko <dvlasenk@...hat.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH -mm 2/2] ptrace_untrace: fix the SIGNAL_STOP_STOPPED
	check

On 02/19, Roland McGrath wrote:
>
> > This bug is ancient too. ptrace_untrace() must not resume the task
> > if the group stop in progress, we should set TASK_STOPPED instead.
>
> Right, the change looks correct.
>
> > Unfortunately, we still have problems here:
> >
> > 	- if the process/thread was traced, SIGNAL_STOP_STOPPED
> > 	  does not necessary means this thread group is stopped.
> >
> > 	- ptrace breaks the bookkeeping of ->group_stop_count.
>
> Neither of these should be true today as I understand the code.

Suppose we have

	int main(void)
	{
		kill(getpid(), SIGSTOP);

		for (;;)
			;
	}

If you strace this task nobody clears SIGNAL_STOP_STOPPED.

As for bookkeeping of ->group_stop_count, I think ptrace_stop() is wrong
in many ways. For example, it decrements ->group_stop_count but doesn't
set SIGNAL_STOP_STOPPED if it becomes zero.

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