Bug 914659 - [abrt] deco-1.6.2-4.fc18: handle_contents: Process /usr/bin/deco was killed by signal 6 (SIGABRT)
Summary: [abrt] deco-1.6.2-4.fc18: handle_contents: Process /usr/bin/deco was killed b...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: deco
Version: 18
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Orcan Ogetbil
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:e52906c9aa6629bffc656f84609...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-22 12:56 UTC by Michael Schwendt
Modified: 2013-03-15 00:10 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-15 00:07:07 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (5.77 KB, text/plain)
2013-02-22 12:56 UTC, Michael Schwendt
no flags Details
File: build_ids (164 bytes, text/plain)
2013-02-22 12:56 UTC, Michael Schwendt
no flags Details
File: cgroup (127 bytes, text/plain)
2013-02-22 12:56 UTC, Michael Schwendt
no flags Details
File: core_backtrace (683 bytes, text/plain)
2013-02-22 12:56 UTC, Michael Schwendt
no flags Details
File: dso_list (316 bytes, text/plain)
2013-02-22 12:56 UTC, Michael Schwendt
no flags Details
File: environ (1.79 KB, text/plain)
2013-02-22 12:56 UTC, Michael Schwendt
no flags Details
File: limits (1.29 KB, text/plain)
2013-02-22 12:56 UTC, Michael Schwendt
no flags Details
File: maps (1.85 KB, text/plain)
2013-02-22 12:56 UTC, Michael Schwendt
no flags Details
File: open_fds (138 bytes, text/plain)
2013-02-22 12:56 UTC, Michael Schwendt
no flags Details
File: proc_pid_status (909 bytes, text/plain)
2013-02-22 12:57 UTC, Michael Schwendt
no flags Details
File: var_log_messages (1.64 KB, text/plain)
2013-02-22 12:57 UTC, Michael Schwendt
no flags Details
proposed fix (336 bytes, patch)
2013-02-23 12:42 UTC, Michael Schwendt
no flags Details | Diff

Description Michael Schwendt 2013-02-22 12:56:36 UTC
Description of problem:
Followed a thread on users list and simply tried to extract an arbitrary src.rpm file.

Version-Release number of selected component:
deco-1.6.2-4.fc18

Additional info:
backtrace_rating: 4
cmdline:        deco samefile-2.14-1.fc18.src.rpm
crash_function: handle_contents
executable:     /usr/bin/deco
kernel:         3.7.2-204.fc18.x86_64
remote_result:  NOTFOUND
uid:            1000

Truncated backtrace:
Thread no. 1 (2 frames)
 #5 handle_contents at arch.c:199
 #6 extract at arch.c:240

Comment 1 Michael Schwendt 2013-02-22 12:56:42 UTC
Created attachment 701159 [details]
File: backtrace

Comment 2 Michael Schwendt 2013-02-22 12:56:44 UTC
Created attachment 701160 [details]
File: build_ids

Comment 3 Michael Schwendt 2013-02-22 12:56:46 UTC
Created attachment 701161 [details]
File: cgroup

Comment 4 Michael Schwendt 2013-02-22 12:56:49 UTC
Created attachment 701163 [details]
File: core_backtrace

Comment 5 Michael Schwendt 2013-02-22 12:56:51 UTC
Created attachment 701165 [details]
File: dso_list

Comment 6 Michael Schwendt 2013-02-22 12:56:53 UTC
Created attachment 701167 [details]
File: environ

Comment 7 Michael Schwendt 2013-02-22 12:56:55 UTC
Created attachment 701169 [details]
File: limits

Comment 8 Michael Schwendt 2013-02-22 12:56:57 UTC
Created attachment 701171 [details]
File: maps

Comment 9 Michael Schwendt 2013-02-22 12:56:59 UTC
Created attachment 701172 [details]
File: open_fds

Comment 10 Michael Schwendt 2013-02-22 12:57:01 UTC
Created attachment 701174 [details]
File: proc_pid_status

Comment 11 Michael Schwendt 2013-02-22 12:57:03 UTC
Created attachment 701176 [details]
File: var_log_messages

Comment 12 Orcan Ogetbil 2013-02-23 03:36:34 UTC
Hi Michael, thanks for the report. 

I tried a bunch of SRPM files (including samefile-2.13-2.fc18.src.rpm as I don't have the samefile-2.14-1.fc18.src.rpm) as well as other archive types but I cannot reproduce the crash. How reproducible is it for you?

I looked at the code. I suspect that the boolean variable a->extr->subdir is set to true in the first pass of the while loop, which breaks the while loop, and the first.p does not get allocated as a result, and then freeing the not-allocated pointer first.p later causes the crash.

But this is just my conjecture, and the backtrace is not very helpful. If you are able to reproduce, could you run this under gdb and see what is the source of the problem? Thanks.

Comment 13 Michael Schwendt 2013-02-23 12:42:35 UTC
Created attachment 701609 [details]
proposed fix

It's uninitialized ptrs in "struct path first" on the stack.

Comment 14 Orcan Ogetbil 2013-02-23 16:16:33 UTC
Yes but setting them to NULL will not allocate memory for these pointers. The line 199:
   free(first.p);
would still crash. No? 
Do we need a protection
   if (first.p)
before this line? Again thanks for your time!

Comment 15 Michael Schwendt 2013-02-23 16:25:17 UTC
free(NULL) is a no-op.

Comment 16 Orcan Ogetbil 2013-02-23 16:30:40 UTC
Oh nevermind. I will take your solution.

Comment 17 Michael Schwendt 2013-02-23 17:36:51 UTC
man 3 free:
|
| [...] If ptr is NULL, no operation is performed.

Btw, if you submit this upstream, it could also become

    struct path first = { NULL, NULL, NULL };

of course, since "struct path" contains just those three pointers currently:

# fs.h
    8  struct path
     9          {
    10          char *p, *e, *z;
    11          };
    12

Comment 18 Orcan Ogetbil 2013-02-23 17:45:46 UTC
Of course. I already submitted the patch, together with a link to this page.

Comment 19 Fedora Update System 2013-02-23 17:55:50 UTC
deco-1.6.2-6.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/deco-1.6.2-6.fc17

Comment 20 Fedora Update System 2013-02-23 17:56:40 UTC
deco-1.6.2-6.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/deco-1.6.2-6.fc18

Comment 21 Fedora Update System 2013-02-24 08:42:23 UTC
Package deco-1.6.2-6.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing deco-1.6.2-6.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-2932/deco-1.6.2-6.fc17
then log in and leave karma (feedback).

Comment 22 Fedora Update System 2013-03-15 00:07:08 UTC
deco-1.6.3-1.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 23 Fedora Update System 2013-03-15 00:10:11 UTC
deco-1.6.3-1.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.


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