mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Nick Warne <nick@linicks.net>,
	Felipe Alfaro Solana <felipe.alfaro@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: chmod 111
Date: Fri, 17 Mar 2006 13:55:28 -0500	[thread overview]
Message-ID: <1142621728.9478.20.camel@localhost.localdomain> (raw)
In-Reply-To: <Pine.LNX.4.64.0603171036240.3618@g5.osdl.org>

On Fri, 2006-03-17 at 10:43 -0800, Linus Torvalds wrote:
> 
> On Fri, 17 Mar 2006, Steven Rostedt wrote:
> > 
> > So I guess if you need to debug a system binary, you need it readable.
> > But I guess that can also be a security problem, and having system
> > binaries not readable, might make you system a little more secure.
> 
> NOTE! The kernel does not guarantee that you can't read execute-only 
> binaries.
> 
> In particular, it's fairly easy to create a shared library that replaces a 
> system library (LD_LIBRARY_PATH) and then just dumps out the binary image.
> 
> So anybody who thinks that 0111 permissions are somehow "more secure" than 
> 0755 is just setting himself up for disappointment.  You're much better 
> off just having all binaries be 0755 and getting the security through 
> other means.
> 
> Basically, you should think of the "executable" bit as a way to say "this 
> file is appropriate for execve(), and btw, that does imply that we'll need 
> to read it into memory too". You should _not_ depend on it for security, 
> although dropping the readability bits will mean that certain -trivial- 
> programs won't be able to read it.
> 
> For example, making a binary unreadable is a perfectly good way to stop a 
> web browser or other interface from exporting it outside the machine: but 
> it's not so much about security as about _accidental_ leaking. 
> 
> So from a security standpoint, you're much better off thinking "executable 
> means readable", than lulling yourself into some false sense of security. 

Yep, I agree whole heartily.  I should have stressed the "little" part
in the above quote. "might make your system a __little__ more secure.".
I didn't want to get into the details that you described, but you are
entirely right.  I just wanted to note that it does stop someone at some
level. But it's more of an annoyance to someone with a little more
experience in hacking into a computer.

But since it does stop some amateur's does give it some weight to
actually do it.  But it is far from actually protecting yourself from a
more devious cracker.

But thanks for the critical disclaimer.

-- Steve



  reply	other threads:[~2006-03-17 18:55 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-17 17:46 Nick Warne
     [not found] ` <6f6293f10603171007vbf752e5n8a3d6f2d65e0a1e7@mail.gmail.com>
2006-03-17 18:11   ` Nick Warne
2006-03-17 18:26     ` Steven Rostedt
2006-03-17 18:43       ` Linus Torvalds
2006-03-17 18:55         ` Steven Rostedt [this message]
2006-03-17 21:44           ` Jan Engelhardt
2006-03-18 12:42             ` Nick Warne
2006-03-17 19:38         ` Phillip Susi
2006-03-17 20:11           ` Linus Torvalds
2006-03-17 20:27             ` Nick Warne
2006-03-17 20:56             ` Willy Tarreau
2006-03-18 14:09     ` Helge Hafting
2006-03-17 18:12 ` Joshua Hudson
     [not found] ` <441AFBF5.7010009@tlinx.org>
2006-03-17 18:14   ` Nick Warne
2006-03-17 18:18 ` Phillip Susi

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=1142621728.9478.20.camel@localhost.localdomain \
    --to=rostedt@goodmis.org \
    --cc=felipe.alfaro@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nick@linicks.net \
    --cc=torvalds@osdl.org \
    /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

Powered by JetHome