This is the mail archive of the
mailing list for the elfutils project.
don't run elfutils as root in ABRT
- From: Adam Šulc <sulcadam12 at gmail dot com>
- To: elfutils-devel at sourceware dot org
- Cc: mhabrnal at redhat dot com, msuchy at redhat dot com, Mark Wielaard <mjw at redhat dot com>
- Date: Fri, 5 May 2017 18:25:30 +0200
- Subject: don't run elfutils as root in ABRT
- Authentication-results: sourceware.org; auth=none
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=KJ7N1lsow1FeyLkMVukJxz49hHtnupZbomXElaIKVlU=; b=Jyve/V3bUEUg/CaejGg2LvX22bMjYHBfR24bss0AmVsuKJSBQwi/BJXQlKyiNF7oZW aJoKyvOUzl2DoNOrcR18WDtTQa78B7/e1ljnWxEmmBtM0vcCA/+1IC+6ZBYoJsDHbX8q SkyZsYIFhW1k7cbeRi/EsX9ii94k4/SW/hsPf9+HJ3LCVNfyd0bkDjJr1WQcs2QqSph4 NHKWISB9p0gYmFNA+tZOZQl7d46lw3AH9TtlJoBQpuKNVPrb5P4Jfb2TgmeY1FtCpiQH LU1kKueeDMFHqxg8Qmm4LRoNYVwIFfJ+EM681kRyVjGjpZ6/BIGON97fOOaYYBlf3+FV uwVQ==
I work on ABRT improvement in order to increase security related to
core backtrace generating using elfutils library.
Here is a short description of my problem:
Goal is to not call base code in elfutils and gdb functions under root.
If you are more interested you can read more there:
We need root for opening /proc files only.
First, we open these files under root,
then we drop capabilities & privileges and finally, we generate core_backtrace.
We have one problem that still persists, we need to pass the opened
/proc/[tid]/mem file to this function:
Because this function opens the /proc/[tid]/mem file itself, thus it
is hard coded and we cannot pass our /proc/[tid]/mem file pointer:
So we dont know how to pass the opened file to this function.
Do you have any idea how to pass the open file descriptor into the
function? Or what is the best way how to achieve this?