mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arjan van de Ven <arjan@infradead.org>
To: rvk@prodmail.net
Cc: omb@bluewin.ch, linux-kernel@vger.kernel.org
Subject: Re: Buffer Over-runs, was Open source firewalls
Date: Fri, 15 Jul 2005 08:51:00 +0200	[thread overview]
Message-ID: <1121410260.3179.3.camel@laptopd505.fenrus.org> (raw)
In-Reply-To: <42D75A93.5010904@prodmail.net>

On Fri, 2005-07-15 at 12:11 +0530, RVK wrote:

> Even in the presence of non-executable stack, Linux Torvalds explains 
> that "It's really easy. You do something like this: 1) overflow the 
> buffer on the stack, so that the return value is overwritten by a 
> pointer to the system() library function. 2) the next four bytes are 
> crap (a "return pointer" for the system call, which you don't care 
> about) 3) the next four bytes are a pointer to some random place in the 
> shared library again that contains the string "/bin/sh" (and yes, just 
> do a strings on the thing and you'll find it). Voila. You didn't have to 
> write any code, the only thing you needed to know was where the library 
> is loaded by default. And yes, it's library-specific, but hey, you just 
> select one specific commonly used version to crash. Suddenly you have a 
> root shell on the system. So it's not only doable, it's fairly trivial 
> to do. In short, anybody who thinks that the non-executable stack gives 
> them any real security is very very much living in a dream world. It may 
> catch a few attacks for old binaries that have security problems, but 
> the basic problem is that the binaries allow you to overwrite their 
> stacks. And if they allow that, then they allow the above exploit. It 
> probably takes all of five lines of changes to some existing exploit, 
> and some random program to find out where in the address space the 
> shared libraries tend to be loaded."

except this is no longer true really ;)

randomisation for example makes this a lot harder to do. 
gcc level tricks to prevent buffer overflows are widely in use nowadays
too (FORTIFY_SOURCE and -fstack-protector). The combination of this all
makes it a LOT harder to actually exploit a buffer overflow on, say, a
distribution like Fedora Core 4.


> 
> 
> rvk
> 
> >but your system is not compromised.
> >
> >One final point, in practice, you get lots of unwanted packets
> >off the internet, and in general you do not want them on your
> >internal net, both for performance and security reasons, if you
> >drop them on your router or firewall then you dont need to
> >worry if the remote app is mal-ware.
> >
> >--
> >mit freundlichen Grüßen, Brian.
> >
> >.
> >
> >  
> >
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/


  reply	other threads:[~2005-07-15  6:51 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-13 16:34 Vinay Venkataraghavan
2005-07-13 16:47 ` Alejandro Bonilla
2005-07-13 17:00   ` Maciej Soltysiak
2005-07-13 17:04 ` Nigel Rantor
2005-07-14 10:13 ` Helge Hafting
2005-07-14 10:24   ` RVK
2005-07-14 12:20     ` Helge Hafting
2005-07-14 12:20       ` RVK
2005-07-14 13:06         ` Helge Hafting
2005-07-14 14:04           ` RVK
2005-07-14 22:53         ` Buffer Over-runs, was " Brian O'Mahoney
2005-07-15  6:41           ` RVK
2005-07-15  6:51             ` Arjan van de Ven [this message]
2005-07-15  8:26               ` RVK
2005-07-15  8:46                 ` Arjan van de Ven
2005-07-15  9:28                   ` RVK
2005-07-15  9:29                   ` RVK
2005-07-15 11:17                   ` RVK
2005-07-15 11:24                     ` Arjan van de Ven

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=1121410260.3179.3.camel@laptopd505.fenrus.org \
    --to=arjan@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=omb@bluewin.ch \
    --cc=rvk@prodmail.net \
    /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®