From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Eric Paris <eparis@redhat.com>,
"jozef.kralik@eset.sk" <jozef.kralik@eset.sk>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
viro@zeniv.linux.org.uk
Subject: Re: [Patch 1/1] fsnotify,fanotify: adding flag for execution
Date: Fri, 25 Mar 2011 09:56:24 +0000 [thread overview]
Message-ID: <20110325095624.0524d975@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <AANLkTi=yQ=n8xNC2GdXic_O6yQYD0r0D8QZwb2CqSk4r@mail.gmail.com>
> We have indeed historically had those kinds of bugs. For example,
> having 'noexec' disable execve() on files, but *not* disabling using
> them as LD_PRELOAD=xyz things where they aren't the target of an
> execve(), but the code in them is run anyway (thanks to just an
> executable mmap(), or even a "read()" into a data segment that is
> executable)
Actually there is a difference
> So I don't know what makes "executed" different from "read". Because
> at some point we really cannot tell the difference.
And this isn't quite true
> The one special thing about execve() is that it can execute something
> even when it's not readable. But people who have depended on that as a
> security feature have always been disappointed (ie just execve it and
> then use ptrace to read the contents of the file _anyway_). So once
And ptrace covers this
The specific case that has always been the one Unix has cared about is
'exec but no read bit', and execve() covers that correctly, including
stopping it being dumpable thus blocking ptrace.
Various standard Unix tricks rely upon this behaviour, notably the cd
into a directory whose name you can't determine to access "protected" by
writable stuff. All of the latter is really about suid apps though.
Alan
next prev parent reply other threads:[~2011-03-25 9:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-24 12:49 jozef.kralik
2011-03-24 15:30 ` Eric Paris
2011-03-25 1:17 ` Linus Torvalds
2011-03-25 9:56 ` Alan Cox [this message]
-- strict thread matches above, loose matches on Subject: below --
2010-12-22 15:22 Jozef Kralik
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=20110325095624.0524d975@lxorguk.ukuu.org.uk \
--to=alan@lxorguk.ukuu.org.uk \
--cc=eparis@redhat.com \
--cc=jozef.kralik@eset.sk \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®