From: Karsten Desler <kdesler@soohrt.org>
To: Martin Josefsson <gandalf@wlug.westbo.se>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: minor bug in iptables 1.2.9
Date: Sat, 31 Jan 2004 14:56:09 +0100 [thread overview]
Message-ID: <20040131135609.GA11570@soohrt.org> (raw)
In-Reply-To: <1075555394.22658.0.camel@tux.rsn.bth.se>
[-- Attachment #1: Type: text/plain, Size: 262 bytes --]
Hi,
today I had a little more time to look at the code. A few lines
down, there's another incarnation of the same bug.
line 641:
char buf[256];
...
strncpy(buf, name, sizeof(buf) - 1);
if ((p = strrchr(buf, '/')) != NULL) {
...
Patch attached.
Karsten
[-- Attachment #2: iptables-1.2.9-overflow2.patch --]
[-- Type: text/plain, Size: 298 bytes --]
--- iptables~.c 2004-01-31 14:42:29.000000000 +0100
+++ iptables.c 2004-01-31 14:53:57.000000000 +0100
@@ -639,6 +640,7 @@
int i, j, k, n;
strncpy(buf, name, sizeof(buf) - 1);
+ buf[sizeof(buf) - 1] = '\0';
if ((p = strrchr(buf, '/')) != NULL) {
*p = '\0';
addrp = parse_mask(p + 1);
next prev parent reply other threads:[~2004-01-31 13:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-30 8:48 minor bug in iptables 1.2.9 Karsten Desler
2004-01-31 13:23 ` Martin Josefsson
2004-01-31 13:56 ` Karsten Desler [this message]
2004-01-31 15:20 ` Martin Josefsson
[not found] ` <20040131142932.GB11570@soohrt.org>
2004-01-31 15:35 ` Martin Josefsson
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=20040131135609.GA11570@soohrt.org \
--to=kdesler@soohrt.org \
--cc=gandalf@wlug.westbo.se \
--cc=netfilter-devel@lists.netfilter.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.