All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] ipset 2.3.0 segfault on '-U :all: {:all:|:default:}
@ 2008-05-29 20:24 Tom Eastep
  2008-05-30  7:18 ` Jozsef Kadlecsik
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Eastep @ 2008-05-29 20:24 UTC (permalink / raw)
  To: netfilter-devel


[-- 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 --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-06-01 21:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-29 20:24 [patch] ipset 2.3.0 segfault on '-U :all: {:all:|:default:} Tom Eastep
2008-05-30  7:18 ` Jozsef Kadlecsik
2008-05-30 10:02   ` Krzysztof Oledzki
2008-06-01 21:14   ` Patrick McHardy

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.