All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adam Sampson <ats@offog.org>
To: kernel-hardening@lists.openwall.com
Subject: Re: [kernel-hardening] Legitimate use of /proc/PID/mem,maps and smaps
Date: Wed, 02 Nov 2016 16:10:30 +0000	[thread overview]
Message-ID: <y2apomdx3pl.fsf@offog.org> (raw)
In-Reply-To: <93057ac3-301d-ed5d-405d-93eb4e3deb30@yuhu.biz> (Marian Marinov's message of "Wed, 2 Nov 2016 05:42:41 +0200")

Marian Marinov <mm-l@yuhu.biz> writes:

> Are there any other legitimate users of these files, maybe X?

This is the kind of question that Debian Code Search is useful for
(although it's not exhaustive):
https://codesearch.debian.net/search?q=%2Fproc%2Fself%2Fmem&perpkg=1
https://codesearch.debian.net/search?q=%2Fproc%2Fself%2Fmaps&perpkg=1
https://codesearch.debian.net/search?q=%2Fproc%2Fself%2Fsmaps&perpkg=1

>From my bug-hunting experience, programs use /proc/self/maps for all
sorts of weird things -- e.g. working out the full path of the
executable, or what version of a shared library they've been linked
against, or guessing whether some random value is a valid pointer. Many
have embedded copies of code from gettext or BinReloc that uses it.

On the other hand, many of these don't actually need all the information
in /proc/self/maps, so you could get away with a simplified version that
only had valid filenames.

-- 
Adam Sampson <ats@offog.org>                         <http://offog.org/>

  parent reply	other threads:[~2016-11-02 16:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-02  3:42 [kernel-hardening] Legitimate use of /proc/PID/mem,maps and smaps Marian Marinov
2016-11-02 15:00 ` Dave Tian
2016-11-02 16:10 ` Adam Sampson [this message]
2016-11-03  0:54   ` Marian Marinov
2016-11-03  2:30     ` Dave Tian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=y2apomdx3pl.fsf@offog.org \
    --to=ats@offog.org \
    --cc=kernel-hardening@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.