Bug 143369 - strace -c: potential NULL dereference
Summary: strace -c: potential NULL dereference
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: strace
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Roland McGrath
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-12-20 01:18 UTC by Dmitry V. Levin
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version: RHBA-2005-130
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-02-02 04:42:40 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
strace-4.5.8-alt-call_summary.patch (641 bytes, patch)
2004-12-20 01:19 UTC, Dmitry V. Levin
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2005:130 0 normal SHIPPED_LIVE strace bug fix update 2005-06-09 04:00:00 UTC
Red Hat Product Errata RHBA-2005:131 0 normal SHIPPED_LIVE strace bug fix update 2005-05-19 04:00:00 UTC

Description Dmitry V. Levin 2004-12-20 01:18:04 UTC
Description of problem:
When tracing trivial programs with "strace -c" and patch from #143365
not applied, call_summary() may call qsort() with unallocated counts[]
array which leads to segfault.

Version-Release number of selected component (if applicable):
strace-4.5.8

Steps to Reproduce:
Actual results:

Assuming that /bin/true is trivial program which does just _exit(0)
$ strace -c /bin/true
Segmentation fault
  
Expected results:
$ strace -c /bin/true
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
------ ----------- ----------- --------- --------- ----------------
100.00    0.000000                     0           total

Comment 1 Dmitry V. Levin 2004-12-20 01:19:27 UTC
Created attachment 108869 [details]
strace-4.5.8-alt-call_summary.patch

Proposed patch.

Comment 2 Roland McGrath 2005-02-02 04:42:40 UTC
I put the patch in.

Comment 3 Tim Powers 2005-05-19 21:10:03 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 the 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-2005-131.html



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