[systemd-bugs] [Bug 87354] systemd-coredump can run elfutils as root

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Dec 20 16:04:29 PST 2014


https://bugs.freedesktop.org/show_bug.cgi?id=87354

Mark Wielaard <mark at klomp.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mark at klomp.org

--- Comment #4 from Mark Wielaard <mark at klomp.org> ---
I have been thinking a bit about this since some friendly fuzzers helped find
some issues in elfutils. See
https://bugzilla.redhat.com/show_bug.cgi?id=1170810

The first thing to do if you are worried about this issue should be upgrading
to elfutils 0.161 which contains lots of hardening patches. See
https://lists.fedorahosted.org/pipermail/elfutils-devel/2014-December/004481.html

I think comment #3 is mostly correct. The core dump/stacktrace is generated
with the uid of the crashing process. Given that someone could make the process
crash in the first place they could probably do much worse. Trying to then take
advantage of the fact that other code then runs with the same uid seems to be a
lot more work than trying to take advantage of the original way to crash the
process in other ways.

An attack that takes advantage of the fact that a core dumper is running does
need to somehow also trick the core file generated to contain an issue that
triggers a bug in core parsing code. That probably requires a bug in the kernel
code that generates the core data. The core dumper, through elfutils, also
accesses other files, either directly because they were executable files mapped
in the process or indirectly because those files contain build-ids that refer
to separete debuginfo files. Those files will be parsed if addresses on the
call stack refer to the mapped in executable files.

So an attack would require making the process crash, and either triggering a
bug in the kernel that generates core data that is not parsed correctly or
manipulating the (call) stack to contain a reference to mapped in executable
ELF data and/or a build-id reference to a debuginfo file that is under control
of the attacker to trigger an ELF/DWARF parsing bug.

It seems somewhat unlikely that the above is true and the attacker can crash
the process, but not manipulate the process more directly. But it still
couldn't hurt to drop even more priviliges while processing the core data and
generating the backtrace. As long as the original ELF files and debuginfo data
files can be accessed.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-bugs/attachments/20141221/43d5d993/attachment.html>


More information about the systemd-bugs mailing list