Bug 572007 - (CVE-2010-0729) CVE-2010-0729 kernel: ia64: ptrace: peek_or_poke requests miss ptrace_check_attach()
CVE-2010-0729 kernel: ia64: ptrace: peek_or_poke requests miss ptrace_check_a...
Status: CLOSED ERRATA
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
ia64 Linux
high Severity high
: ---
: ---
Assigned To: Red Hat Product Security
impact=important,source=redhat,public...
: Security
Depends On: 567321 572008 572009
Blocks:
  Show dependency treegraph
 
Reported: 2010-03-09 19:20 EST by Eugene Teo (Security Response)
Modified: 2015-08-24 12:05 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-08-24 12:05:00 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Eugene Teo (Security Response) 2010-03-09 19:20:05 EST
(Internal git) Commit c31d1f3f363a5c3b6dbd4d6daa36fa0f4273e948 "a64: fix deadlock in ia64 sys_ptrace" moved ptrace_check_attach() from find_thread_for_addr() to tasklist-is-not-held area. However it introduced other problems.

In the likely case, when rbs_child == child, ptrace_check_attach() is never called. Otherwise we do ptrace_check_attach(rbs_child) twice. This means that any peek/poke request can silently fail and fool the tracer.

With this patch the logic is
	ptrace_check_attach(child);

	if (rbs_child != child) {
		// we should use rbs_child ...
		if (!ptrace_check_attach(rbs_child))
			child = rbs_child;

		// but if check_attach() fails we continue to
		// use child, we are doing as well as we can.
	}

To simplify the error-handling and the logic, this patch changes the code to detect the likely rbs_child == child case earlier, right after find_thread_for_addr().

This only affects Red Hat Enterprise Linux 4.
Comment 5 Eugene Teo (Security Response) 2010-03-09 19:31:56 EST
From Oleg, the problem is, ptrace_check_attach() also verifies the caller is the tracer and thus it have the rights to do "anything it wants" with the tracee.

But since ptrace_check_attach() can be missed, any user can do ptrace() on any target even without PTRACE_ATTACH.
Comment 6 errata-xmlrpc 2010-05-05 09:05:12 EDT
This issue has been addressed in following products:

  Red Hat Enterprise Linux 4

Via RHSA-2010:0394 https://rhn.redhat.com/errata/RHSA-2010-0394.html

Note You need to log in before you can comment on or make changes to this bug.