Bug 143369 - strace -c: potential NULL dereference
strace -c: potential NULL dereference
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: strace (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Roland McGrath
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-12-19 20:18 EST by Dmitry V. Levin
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version: RHBA-2005-130
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-02-01 23:42:40 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Dmitry V. Levin 2004-12-19 20:18:04 EST
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-19 20:19:27 EST
Created attachment 108869 [details]
strace-4.5.8-alt-call_summary.patch

Proposed patch.
Comment 2 Roland McGrath 2005-02-01 23:42:40 EST
I put the patch in.
Comment 3 Tim Powers 2005-05-19 17:10:03 EDT
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.