Re: [PATCH] proc: maps protection



On Tue, Mar 06, 2007 at 08:22:11PM -0800, Arjan van de Ven wrote:
How about using a reduced check, as is done for fd and environ? This
would allow root-running system monitors to still do their job.
Effectively, this changes the test from "is ptracing" to just "can
ptrace".

If this still isn't considered safe, I'll add the maps_protect file...

btw I consider it an information leak that any user can see which
files/libraries any other user and root has mmap'd. (and with glibc's
stdio mmap feature that goes even beyond direct mmap to fopen()'d).

If root or some other user wants to watch
hillary-vs-obama-in-the-mud.avi, no other user has ANY business even
seeing that. So at minimum it's a privacy issue showing the filenames...

Sure, I would be fine with making /proc/<pid>/maps mode 0400 (so long as
root can still read it). But please don't take away my ability to debug
applications using pmap(1). It's so incredibly useful to be able to say
"ah, look, he mapped nss_nis.so rather than nss_nisplus.so".

-andy
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: [PATCH] proc: maps protection
    ... ptrace". ... If this still isn't considered safe, ... files/libraries any other user and root has mmap'd. ... stdio mmap feature that goes even beyond direct mmap to fopen'd). ...
    (Linux-Kernel)
  • Flaws in recent Linux kernels
    ... The first vulnerability results in local DoS. ... to the ptrace bug mentioned. ... Root compromise by ptrace ... setuid root and world-executable. ...
    (Bugtraq)
  • Re: exiting chroot()
    ... PD> Only root can ptrace another process. ... except when this second process has signs of former existance under ... another user (sugid flag on BSD, undumpable flag on Linux & Solaris, etc.) ...
    (comp.unix.programmer)
  • Re: Flaws in recent Linux kernels
    ... Flaws in recent Linux kernels ... ptrace is basically used to dig out problems. ... will run as root. ... It's certainly a good thing to be able to ptrace without being root. ...
    (Bugtraq)