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-next>] [day] [month] [year] [list]
Message-ID: <20090608161204.GA3986@redhat.com>
Date:	Mon, 8 Jun 2009 18:12:04 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	David Howells <dhowells@...hat.com>,
	Roland McGrath <roland@...hat.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Q: PTRACE_ATTACH && -EINTR

I just realized that ->cred_exec_mutex added a user-visible change
which may confuse user-space.

	ptrace_attach:

		retval = mutex_lock_interruptible(&task->cred_exec_mutex);
		if (retval  < 0)
			goto out;

This doesn't look good, we return -EINTR. Suppose that strace tries to
attach to all sub-threads and ptrace(PTRACE_ATTACH) returns -EINTR just
because the already traced thread sends SIGCHLD. Or tracer's sub-thread
does recalc_sigpending_and_wake().

I think we should at least do

		retval = -ERESTARTSYS;
		if (mutex_lock_interruptible(&task->cred_exec_mutex))
			goto out;

Or even -ERESTARTNOINTR ? Or just mutex_lock() ?

Or ignore this problem since nobody complained?

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