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, 19 Jun 2013 18:32:34 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	Denys Vlasenko <dvlasenk@...hat.com>
Cc:	linux-kernel@...r.kernel.org,
	Jan Kratochvil <jan.kratochvil@...hat.com>,
	"Dmitry V. Levin" <ldv@...linux.org>
Subject: Re: [PATCH] ptrace: make PTRACE_DETACH work on non-stopped tracees.

On 06/19, Denys Vlasenko wrote:
>
> This is a user-visible behavior change.
> Do we really have to introduce a separate
> PTRACE_NOT_STUPID_DETACH? I hope not.

Oh, I think yes.

> @@ -1062,7 +1060,8 @@ SYSCALL_DEFINE4(ptrace, long, request, long, pid, unsigned long, addr,
>  	}
>
>  	ret = ptrace_check_attach(child, request == PTRACE_KILL ||
> -				  request == PTRACE_INTERRUPT);
> +				  request == PTRACE_INTERRUPT ||
> +				  request == PTRACE_DETACH);

There doesn't look right.

For example ptrace_disable(). See the comment set_task_blockstep().
And flush_ptrace_hw_breakpoint() can race with the exiting task.

And the setting of ->exit_code is racy too.

And this makes the ptrace_unfreeze_traced() logic more confusing...
but probably this is fine.

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