public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Helge Hafting <helge.hafting@aitel.hist.no>
To: rvk@prodmail.net
Cc: Vinay Venkataraghavan <raghavanvinay@yahoo.com>,
	linux-crypto@nl.linux.org, linux-kernel@vger.kernel.org
Subject: Re: Open source firewalls
Date: Thu, 14 Jul 2005 15:06:18 +0200	[thread overview]
Message-ID: <42D6634A.2000801@aitel.hist.no> (raw)
In-Reply-To: <42D658A9.7050706@prodmail.net>

RVK wrote:

> Proxies can be a good way of filtering but it can't avoid buffer 
> overflows. 

Yes they can - did you read and udnerstand my previous post at all?
A proxy _can_ avoid a buffer overflow by noticing the
anomalously large data item and simply refuse to pass
it on to the real server!  The proxy can terminate the tcp
connection and throw away the data.

> It can only increase it. More code more bugs. 

Of course the proxy can be buggy too, but it is easier to
avoid problems there:
1. The server was written to perform a service, perhaps with
    security thrown in later.  (Yes, that's bad design.)
    A firewall proxy is written for security, so buffer overflows
    are usually avoided in the firewall proxy itself.  Because this
    is exactly what the firewall writer is thinking about.
2. The proxy may be much smaller and simpler than the server
    it protects, it is therefore much easier to audit for security
    problems.
3. Fixing the server is indeed best, but not necessarily an option.
    It could be proprietary, or written in a unknown language.

> If it is running on a hardware firewall as a service then its more

"Hardware firewall" ???

> dangerous as once it is compramised then IDS signatures also can be 
> deleated :-). No use of IDS the right ?

A compromised firewall is of no use - sure.  So what? That applies
to any firewall, any IDS, or any server for that matter.

> So the best way is either make your code free of buffer overflows or

Yes, but the server may not be "my code" at all.  Can't you see that
problem?  It may very well be someone elses code.  I may not have the
source, or the source may be useless for a number of reasons,
such as:
1. being written in a language I don't understand
2. Have a licence that forbids change
3. Need compilers/tools I don't have
4. Being such a nasty mess that writing a proxy is much easier
    than fixing the bloated ill-designed server code one
    unfortunately depends on for the time being.

In these cases, I can still protect my server with a proxy firewall,
although I can't fix the server itself.

> use some library which controls the attack during any buffer overflow 
> or use Stack Randomisation and Canary based approaches.

A library that controls any buffer overflow doesn't exist at all.

Stack randomization helps but don't solve all cases, the attacker
simply need code to search for randomly moved parts he need, pad with
a few megabytes of NOPs and things like that.  Of course, a proxy
can easily detect megabytes of NOPs and kill that connection . . .

Helge Hafting

  reply	other threads:[~2005-07-14 12:59 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-13 16:34 Open source firewalls 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 [this message]
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
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=42D6634A.2000801@aitel.hist.no \
    --to=helge.hafting@aitel.hist.no \
    --cc=linux-crypto@nl.linux.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=raghavanvinay@yahoo.com \
    --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