Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 642389

Summary: [6.0] Even if clone() is invoked with CLONE_UNTRACED, the child process can be traced by strace.
Product: Red Hat Enterprise Linux 6 Reporter: Alan Matsuoka <alanm>
Component: straceAssignee: Andreas Schwab <schwab>
Status: CLOSED ERRATA QA Contact: qe-baseos-tools-bugs
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0CC: ebachalo, fnadge, hchiramm, jwest, pmuller, roland, skito, syeghiay
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: strace-4.5.19-1.9.el6 Doc Type: Bug Fix
Doc Text:
Cause: Even if clone is invoked with CLONE_UNTRACED, the child process can be traced by strace Consequence: Fix: don't trace children created with CLONE_UNTRACED Result: children created with CLONE_UNTRACED are not traced
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-03-10 07:45:39 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 675106    
Bug Blocks: 662543    
Attachments:
Description Flags
testpro.c
none
sosreport-TX120-RHEL6-intel64-20101006105632-9195.tar.xz none

Description Alan Matsuoka 2010-10-12 18:53:00 UTC
Summary: [6.0] Even if clone() is invoked with CLONE_UNTRACED, the child process can be traced by strace.

RHN System ID:

Customer Contact Name:
Noriyuki Suganuma

Description of Problem:
Even if clone() is invoked with CLONE_UNTRACED, the child process can be traced by strace.

Please see the following log:
[root@RHEL6 24]# strace -f ./test
...snip...
16074 clone(child_stack=0x18703ff, flags=CLONE_UNTRACED|SIGCHLD) = 16075
...snip...
16074 nanosleep({5, 0}, <unfinished ...>
16075 getpid() = 16075
16075 alarm(5) = 0
16074 <... nanosleep resumed> 0x7fffe901fd10) = 0
16074 exit_group(0) = ?
16075 --- SIGALRM (Alarm clock) @ 0 (0) ---
===

On the other hand, strace of RHEL5 works properly.
A child process which is created by clone() with CLONE_UNTRACED can not be traced.
===
[root@RHEL5 24]# strace -f ./test
...snip...
6847 clone(child_stack=0xc7933ff, flags=CLONE_UNTRACED|SIGCHLD) = 6848
...snip...
6847 nanosleep({5, 0}, 0x7ffff9b764c0) = ? ERESTART_RESTARTBLOCK (To be restarted)
6847 --- SIGCHLD (Child exited) @ 0 (0) ---
6847 restart_syscall(<... resuming interrupted call ...>) = 0
6847 exit_group(0) = ?
===

Version-Release number of selected component:
Red Hat Enterprise Linux Version Number: 6.0
Release Number: R
Architecture: x86_64
Kernel Version: 2.6.32-71.el6.x86_64
Related Package Version: strace-4.5.19-1.6.el6.x86_64
Related Middleware/Application: none

Drivers or hardware or architecture dependency:
none

How reproducible:
Always

Step to Reproduce:
I attach a reproducer: testpro.c

1. Compile the above target program (testpro.c):
# gcc -g -o testpro testpro.c

2. Execute test program:
# strace -f ./testpro

Actual Results:
Child process is traced.

Expected Results:
Child process is not traced.

Summary of actions taken to resolve issue: none

Location of diagnostic data: none

Hardware configuration:
Model: PRIMERGY TX120
CPU Info: Intel Xeon CPU 1.86GHz x 2
Memory Info: 2GB
Hardware Component Information: none
Configuration Info: none


Business Impact:
This is incompatible with RHEL5 and does not conform to the description of man manual.
So this should be fixed.


Target Release: RHEL6.1
Errata Request: No
Hotfix Request: No


Additional Info:
sosreport-TX120-RHEL6-intel64-20101006105632-9195.tar.xz
(The md5sum is: b4633be606f8f248bf6e69f16b729195)

Comment 2 Alan Matsuoka 2010-10-12 18:54:47 UTC
Created attachment 453013 [details]
testpro.c

Comment 3 Alan Matsuoka 2010-10-12 18:55:57 UTC
Created attachment 453014 [details]
sosreport-TX120-RHEL6-intel64-20101006105632-9195.tar.xz

Comment 4 Roland McGrath 2010-10-12 19:08:35 UTC
This was already changed upstream.  Probably RHEL6 should get a rebase to the next upstream release when that's made.

Comment 9 Florian Nadge 2011-01-27 15:09:23 UTC
Please be so kind and add a few key words to the Technical Note field of this
Bugzilla entry using the following structure:

Cause:

Consequence:

Fix:

Result:


For details, see:
https://bugzilla.redhat.com/page.cgi?id=fields.html#cf_release_notes

Thanks

Comment 10 Florian Nadge 2011-01-27 15:09:23 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause:

Consequence:

Fix:

Result:

Comment 11 Andreas Schwab 2011-01-27 16:28:42 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,7 +1,10 @@
 Cause:
+Even if clone is invoked with CLONE_UNTRACED, the child process can be traced by strace
 
 Consequence:
 
 Fix:
+don't trace children created with CLONE_UNTRACED
 
-Result:+Result:
+children created with CLONE_UNTRACED are not traced

Comment 13 errata-xmlrpc 2011-03-10 07:45:39 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0338.html