Skip to content

Commit

Permalink
Merge pull request traviscross#26 from RichiH/master
Browse files Browse the repository at this point in the history
SECURITY: Improve/fix wording, spelling, and formatting
  • Loading branch information
rewolff committed Aug 7, 2013
2 parents 5a44184 + 4c37f10 commit a667c8c
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions SECURITY
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@ minimal.
Or you can make mtr setuid-root, and the following applies to you....

Since mtr is installed as suid-root, some concern over security is
justified. Since version 0.21 of mtr, does the following two things
justified. Since version 0.21, mtr does the following two things
after it is launched:

* mtr requests a pair of raw sockets from the kernel.
* mtr sets the effective uid to match the real uid.
* mtr drops root privileges by setting the effective uid to match
uid or the user calling mtr.

See main() in mtr.c and net_preopen() in net.c for the details of this
process. Note that no code from GTK+ or curses is executed before the
drop in permissions.
process. Note that no code from GTK+ or curses is executed before
dropping root privileges.

This should severely limit the possibilities of using mtr to breach
system security. This means the worst case scenerio is as follows:
Expand All @@ -24,10 +25,10 @@ Due to some oversight in the mtr code, a malicious user is able to
overrun one of mtr's internal buffers with binary code that is
eventually executed. The malicious user is still not able to read
from or write to any system files which they wouldn't normally have
permission to write to. The only priveledge gained is access to the
raw socket descriptors, which would allow the malicious user to listen
to all ICMP packets arriving at the system, and send forged packets
with arbitrary contents.
permission to read or write to, repectively. The only privilege
gained is access to the raw socket descriptors, which would allow
the malicious user to listen to all ICMP packets arriving at the
system, and to send forged packets with arbitrary contents.

The mtr-code does its best to prevent calling of external library
code before dropping privileges. It seems that C++ library code has
Expand All @@ -36,7 +37,7 @@ loader/linker. That would mean that we're still vulnerable to
errors in that code. This is why I would prefer to drop the backends,
have mtr-core always run in "raw" mode, and have the backends interpret
the output from the mtr-core. Maybe a nice project for a college-level
student.
student.

If you have further questions or comments about security issues,
please direct them to the mtr mailing list. See README for details.

0 comments on commit a667c8c

Please sign in to comment.