From: Willy Tarreau <willy@w.ods.org>
To: linux-kernel@vger.kernel.org
Subject: Re: propolice support for linux
Date: Fri, 14 Jan 2005 07:25:26 +0100 [thread overview]
Message-ID: <20050114062526.GK7048@alpha.home.local> (raw)
In-Reply-To: <20050113225244.GH14127@boetes.org>
Hi,
On Thu, Jan 13, 2005 at 11:52:22PM +0100, Han Boetes wrote:
> 1) Where an application compiled with PP is working worse or even
> failing where it would work right without PP.
No idea on this one, I never tried PP, although I know how it basically
works since I worked on a similar concept in 97 of last century (but I
didn't have the skills to touch the compiler and still don't).
> 2) Where a bufferoverflow can be exploited even though the
> application is compiled with PP.
1) any broken function of this kind :
int create_temp_dir(struct task *t, char *dir) {
int err;
int can_unlink;
char dirname[MAXPATHLEN];
can_unlink = (task->euid == 0);
strncpy(dirname, dir, MAXPATHLEN);
strcat(dirname, "/tmp");
dirname[MAXPATHLEN] = '\0';
if (err = mkdir(dirname, 0755)) {
if (can_unlink) {
unlink(dirname);
err = mkdir(dirname, 0755);
}
}
return err;
}
Get it ? Just pass any name of MAXPATHLEN length, and get
any existing file removed and replace with an empty directory.
Useful for hosts.deny, /var/log/messages, init scripts, etc...
2) all heap overflows (but not in kernel AFAIK).
I think you have a misconception about what a buffer overflow is. First,
propolice will be usable only against some *stack* overflows (which I agree
are the most common in userspace). But regular buffer overflows like above,
which can be triggered either in the stack on in the data space, are not
stopped. And heap overflows such as the double free bug in zlib will not
be prevented by propolice either.
> As an example where PP does work right the test-code provided by
> the propolice maintainer:
>
> /* test-propolice.c */
> #define OVERFLOW "This is longer than 10 bytes"
> #include <string.h>
> int main (int argc, char *argv[]) {
> char buffer[10];
> strcpy(buffer, OVERFLOW);
> return 0;
> }
>
This is kind, but this is also the easiest buggy program to write. The one
we all use when trying to write shell code. But this is far away from real
life, there often are other constraints.
Like others, I think that PP is close to useless in the kernel, but since
the patch is little and does not break anything, why not include it to let
people try it and return feedback ?
Regards,
Willy
next prev parent reply other threads:[~2005-01-14 6:35 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-13 13:46 Han Boetes
2005-01-13 14:04 ` Christoph Hellwig
2005-01-13 14:53 ` Arjan van de Ven
2005-01-13 16:37 ` Han Boetes
2005-01-13 17:02 ` Arjan van de Ven
2005-01-13 19:32 ` Han Boetes
2005-01-14 7:35 ` Arjan van de Ven
2005-01-13 17:07 ` Bill Davidsen
2005-01-13 17:31 ` Han Boetes
2005-01-13 17:58 ` Zwane Mwaikambo
2005-01-13 18:17 ` Han Boetes
2005-01-14 4:25 ` Mitchell Blank Jr
2005-01-14 10:30 ` Han Boetes
2005-01-15 2:25 ` Mitchell Blank Jr
2005-01-15 8:10 ` Han Boetes
2005-01-13 14:07 ` Arjan van de Ven
2005-01-13 14:15 ` Jakub Jelinek
2005-01-13 19:58 ` Andi Kleen
2005-01-13 21:11 ` Ulrich Drepper
2005-01-13 22:52 ` Han Boetes
2005-01-14 6:25 ` Willy Tarreau [this message]
2005-01-14 7:06 ` Ulrich Drepper
2005-01-14 14:08 ` Nix
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=20050114062526.GK7048@alpha.home.local \
--to=willy@w.ods.org \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®