All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Eastep <teastep@shorewall.net>
To: netfilter-devel@vger.kernel.org
Subject: [patch] ipset 2.3.0 segfault on '-U :all: {:all:|:default:}
Date: Thu, 29 May 2008 13:24:58 -0700	[thread overview]
Message-ID: <483F111A.40700@shorewall.net> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 468 bytes --]

Segfault occurs at line 1641 as a result of dereferencing a null pointer 
while testing the set type for iptreemap.

Patch attached.

Disclaimer: I didn't research the consequences of this patch if there are 
existing iptreemap sets.

-Tom
-- 
Tom Eastep    \ Nothing is foolproof to a sufficiently talented fool
Shoreline,     \ http://shorewall.net
Washington USA  \ teastep@shorewall.net
PGP Public Key   \ https://lists.shorewall.net/teastep.pgp.key

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: ipset.diff --]
[-- Type: text/x-patch; name="ipset.diff", Size: 482 bytes --]

--- ipset.c~	2007-08-27 23:53:14.000000000 -0700
+++ ipset.c	2008-05-29 13:10:02.000000000 -0700
@@ -1638,7 +1638,7 @@
 	DP("(%s, %s) -> %s", set ? set->name : IPSET_TOKEN_ALL, adt, binding);
 
 	/* Ugly */
-	if (strcmp(set->settype->typename, "iptreemap") == 0)
+	if (set && strcmp(set->settype->typename, "iptreemap") == 0)
 		exit_error(PARAMETER_PROBLEM,
 			"iptreemap type of sets cannot be used at binding operations\n");
 	/* Alloc memory for the data to send */

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 254 bytes --]

             reply	other threads:[~2008-05-29 20:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-29 20:24 Tom Eastep [this message]
2008-05-30  7:18 ` [patch] ipset 2.3.0 segfault on '-U :all: {:all:|:default:} Jozsef Kadlecsik
2008-05-30 10:02   ` Krzysztof Oledzki
2008-06-01 21:14   ` Patrick McHardy

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=483F111A.40700@shorewall.net \
    --to=teastep@shorewall.net \
    --cc=netfilter-devel@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 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.