Bug 245529 - drkonqi fails when PTRACE restrictions are active
Summary: drkonqi fails when PTRACE restrictions are active
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: SVN
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-23 11:51 UTC by Kees Cook
Modified: 2010-12-15 22:30 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
fix to declare PTRACE relationship (1006 bytes, patch)
2010-07-23 11:53 UTC, Kees Cook
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kees Cook 2010-07-23 11:51:22 UTC
Version:           SVN (using Devel) 
OS:                Linux

Startgin with Ubuntu 10.10, PTRACE is limited to only direct descendants.  Exceptions can be declared on a process-by-process basis using prctl.  The attached patch makes sure that drkonqi can still process KDE application crashes.

Reproducible: Always

Steps to Reproduce:
$ kate &
...
$ kill -SEGV $(pidof kate)

Actual Results:  
Drkonqi will not show backtraces, and will report gdb errors on stderr.

Expected Results:  
Drkonqi will report backtrace normally.

Adding prctl(PR_SET_PTRACER, pid, 0, 0, 0) will fix this in the seg handler.
Comment 1 Kees Cook 2010-07-23 11:53:10 UTC
Created attachment 49426 [details]
fix to declare PTRACE relationship

Patch attached to fix this.  (Note that this is harmless for systems that do not use PTRACE restrictions.)
Comment 2 Jonathan Riddell 2010-12-15 18:02:13 UTC
SVN commit 1206730 by jriddell:

Description: declare the process that will be debugging the crashed KDE app.
Author: Kees Cook <kees@ubuntu.com>
Bug-Ubuntu: https://launchpad.net/bugs/589841
BUG:245529


 M  +5 -0      kcrash.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1206730
Comment 3 Jonathan Riddell 2010-12-15 18:03:25 UTC
SVN commit 1206732 by jriddell:

backport 1206730
Description: declare the process that will be debugging the crashed KDE app.
Author: Kees Cook <kees@ubuntu.com>
Bug-Ubuntu: https://launchpad.net/bugs/589841
BUG: 245529


 M  +5 -0      kcrash.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1206732
Comment 4 David Faure 2010-12-15 22:30:08 UTC
SVN commit 1206787 by dfaure:

Fix compilation on everything else than linux.
Instead of a cmake check, we can just say "if linux" for the linux-specific call, this is simpler.
CCMAIL: jr@jriddell.org
CCBUG: 245529


 M  +5 -0      kcrash.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1206787