FAIL: parent ptrace(PTRACE_SINGLESTEP) failed - : No such process

Bug #1145234 reported by Paul Larson on 2013-03-04
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QA Regression Testing
Undecided
John Johansen
linux (Ubuntu)
Undecided
Unassigned
Lucid
Undecided
John Johansen

Bug Description

Running an SRU regression test for Lucid today, the ptrace tests seem to be failing. The full logs of one of the runs can be found at:
https://jenkins.qa.ubuntu.com/job/sru_kernel-lucid-generic_amd64-kvm-virtual/14/testReport/junit/autotest/ubuntu_qrt_apparmor/test_apparmor_py/

Proposed kernel version: 2.6.32-46.105-generic 2.6.32.60+drm33.26

Steve Beattie (sbeattie) wrote :
Download full text (5.3 KiB)

I'm able to reproduce this on 2.6.32-46.105-generic 2.6.32.60+drm33.26.

Specifically, the apparmor upstream ptrace tests are failing. Given that the one of the recent security updates dealt with a ptrace issue, this may be fallout from that.

The testsuite output looks like:

running ptrace
Error: ptrace failed. Test 'test 1' was expected to 'pass'. Reason for failure 'FAIL: parent ptrace(PTRACE_SINGLESTEP) failed - : No such process
FAIL: parent failed: : Invalid argument'
Error: ptrace failed. Test 'test 1 -h' was expected to 'pass'. Reason for failure 'FAIL: parent ptrace(PTRACE_SINGLESTEP) failed - : No such process
FAIL: parent failed: : Invalid argument'
Error: ptrace failed. Test 'test 1 -h prog' was expected to 'pass'. Reason for failure 'FAIL: parent ptrace(PTRACE_SINGLESTEP) failed - : No such process
FAIL: parent failed: : Invalid argument'
Error: ptrace failed. Test 'test 2' was expected to 'pass'. Reason for failure 'FAIL: parent ptrace(PTRACE_SINGLESTEP) failed - : No such process
FAIL: parent failed: : Invalid argument'
Error: ptrace failed. Test 'test 2 -h' was expected to 'pass'. Reason for failure 'FAIL: parent ptrace(PTRACE_SINGLESTEP) failed - : No such process
FAIL: parent failed: : Invalid argument'
Error: ptrace failed. Test 'test 2 -h prog' was expected to 'pass'. Reason for failure 'FAIL: parent ptrace(PTRACE_SINGLESTEP) failed - : No such process
FAIL: parent failed: : Invalid argument'
Error: ptrace failed. Test 'test 3 -h' was expected to 'pass'. Reason for failure 'FAIL: parent ptrace(PTRACE_SINGLESTEP) failed - : No such process
FAIL: parent failed: : Invalid argument'
Error: ptrace failed. Test 'test 4 -h' was expected to 'pass'. Reason for failure 'FAIL: parent ptrace(PTRACE_SINGLESTEP) failed - : No such process
FAIL: parent failed: : Invalid argument'
Error: ptrace failed. Test 'test 5 -h' was expected to 'pass'. Reason for failure 'FAIL: parent ptrace(PTRACE_SINGLESTEP) failed - : No such process
FAIL: parent failed: : Invalid argument'
Error: ptrace failed. Test 'test 6 -h' was expected to 'pass'. Reason for failure 'FAIL: parent ptrace(PTRACE_SINGLESTEP) failed - : No such process
FAIL: parent failed: : Invalid argument'
Error: ptrace failed. Test 'test 6 -h prog' was expected to 'pass'. Reason for failure 'FAIL: parent ptrace(PTRACE_SINGLESTEP) failed - : No such process
FAIL: parent failed: : Invalid argument'
Error: ptrace failed. Test 'test 7' was expected to 'pass'. Reason for failure 'FAIL: parent ptrace(PTRACE_SINGLESTEP) failed - : No such process
FAIL: parent failed: : Invalid argument'
Error: ptrace failed. Test 'test 7 -h' was expected to 'pass'. Reason for failure 'FAIL: parent ptrace(PTRACE_SINGLESTEP) failed - : No such process
FAIL: parent failed: : Invalid argument'
Error: ptrace failed. Test 'test 7 -h prog' was expected to 'pass'. Reason for failure 'FAIL: parent ptrace(PTRACE_SINGLESTEP) failed - : No such process
FAIL: parent failed: : Invalid argument'
Error: ptrace failed. Test 'test 7a' was expected to 'pass'. Reason for failure 'FAIL: parent ptrace(PTRACE_SINGLESTEP) failed - : No such process
FAIL: parent failed: : Invalid argument'
Error: ptrace failed. Test 'test 7a -h' was expe...

Read more...

Changed in qa-regression-testing:
status: New → Confirmed
Steve Beattie (sbeattie) wrote :

Okay, it looks like the ptrace fixes in 2.6.32-45.104 introduced this as I am able to reproduce this with that kernel but not 2.6.32-44.98. I also don't see this with oneiric, either.

Assigning to jjohansen to get him to look at it.

Changed in qa-regression-testing:
assignee: nobody → John Johansen (jjohansen)
Paul Larson (pwlars) wrote :

Any updates on this? There is an SRU that is waiting on the outcome of this bug: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1136526

John Johansen (jjohansen) wrote :

I traced it to commit
9e74eb39ea55e31e7d54df94b4d3194053f8d0ed

which is one of 4 needed to address CVE-2013-0871.

I have been reworking through the backport but do not have a fix yet

John Johansen (jjohansen) wrote :

The proposed attached patch fixes the problem. The alternative is a multi-commit backport.

John Johansen (jjohansen) wrote :

Note: the apparmor test suite that exposed this regression can be used test this. The tests are already in qrt and are some of the test in the apparmor source under apparmor/test/regression/subdomain/ptrace.sh

If the regression is present it will show up with the output as shown in comment #1

Tim Gardner (timg-tpi) on 2013-03-22
Changed in linux (Ubuntu Lucid):
status: New → Fix Committed
Changed in linux (Ubuntu):
status: New → Invalid
Changed in linux (Ubuntu Lucid):
assignee: nobody → John Johansen (jjohansen)
Brad Figg (brad-figg) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed' to 'verification-done'.

If verification is not done by one week from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-lucid
Brad Figg (brad-figg) wrote :

Since this is essentially a CVE (a fix to a regression introduced by a CVE) it does not require verification. However, I know there has been quite a bit of testing done on this fix and has been shown to be correct for those tests. So, I'm marking it verification complete.

tags: added: verification-done-lucid
removed: verification-needed-lucid

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 2.6.32-46.107

---------------
linux (2.6.32-46.107) lucid-proposed; urgency=low

  [Steve Conklin]

  * Release Tracking Bug
    - LP: #1158939

  [ Ben Hutchings ]

  * SAUCE: signal: Fix use of missing sa_restorer field
    - LP: #1153813
    - CVE-2013-0914

  [ Upstream Kernel Changes ]

  * ipvs: fix info leak in getsockopt(IP_VS_SO_GET_TIMEOUT)
    - LP: #1156732
    - CVE-2012-6540
  * kernel/signal.c: use __ARCH_HAS_SA_RESTORER instead of SA_RESTORER
    - LP: #1153813
    - CVE-2013-0914

linux (2.6.32-46.106) lucid-proposed; urgency=low

  [Steve Conklin]

  * Release Tracking Bug
    - LP: #1158829

  [ Upstream Kernel Changes ]

  * tmpfs: fix use-after-free of mempolicy object
    - LP: #1143815
    - CVE-2013-1767
  * keys: fix race with concurrent install_user_keyrings()
    - LP: #1152788
    - CVE-2013-1792
  * signal: always clear sa_restorer on execve
    - LP: #1153813
    - CVE-2013-0914
  * Fix ptrace when task is in task_is_stopped(), state
    - LP: #1145234
  * xfrm_user: fix info leak in copy_to_user_tmpl()
    - LP: #1156716
    - CVE-2012-6537
  * xfrm_user: fix info leak in copy_to_user_policy()
    - LP: #1156716
    - CVE-2012-6537
  * xfrm_user: fix info leak in copy_to_user_state()
    - LP: #1156716
    - CVE-2012-6537
  * net: fix info leak in compat dev_ifconf()
    - LP: #1156728
    - CVE-2012-6539
 -- Steve Conklin <email address hidden> Fri, 22 Mar 2013 13:57:09 -0500

Changed in linux (Ubuntu Lucid):
status: Fix Committed → Fix Released
Steve Beattie (sbeattie) wrote :

This was not a qa-regression-testing bug, closing that task.

Changed in qa-regression-testing:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers