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

* Re: [patch] ipset 2.3.0 segfault on '-U :all: {:all:|:default:}
  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
  0 siblings, 2 replies; 4+ messages in thread
From: Jozsef Kadlecsik @ 2008-05-30  7:18 UTC (permalink / raw)
  To: Tom Eastep; +Cc: netfilter-devel

On Thu, 29 May 2008, Tom Eastep wrote:

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

Thank you the report and the patch: I'll apply it as soon as the svn->git 
migration of ipset source is ready.

Best regards,
Jozsef
-
E-mail  : kadlec@blackhole.kfki.hu, kadlec@mail.kfki.hu
PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : KFKI Research Institute for Particle and Nuclear Physics
          H-1525 Budapest 114, POB. 49, Hungary

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

* Re: [patch] ipset 2.3.0 segfault on '-U :all: {:all:|:default:}
  2008-05-30  7:18 ` Jozsef Kadlecsik
@ 2008-05-30 10:02   ` Krzysztof Oledzki
  2008-06-01 21:14   ` Patrick McHardy
  1 sibling, 0 replies; 4+ messages in thread
From: Krzysztof Oledzki @ 2008-05-30 10:02 UTC (permalink / raw)
  To: Jozsef Kadlecsik; +Cc: Tom Eastep, netfilter-devel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 491 bytes --]



On Fri, 30 May 2008, Jozsef Kadlecsik wrote:

> On Thu, 29 May 2008, Tom Eastep wrote:
>
>> Segfault occurs at line 1641 as a result of dereferencing a null pointer while
>> testing the set type for iptreemap.
>>
>> Patch attached.
>
> Thank you the report and the patch: I'll apply it as soon as the svn->git
> migration of ipset source is ready.

This remains me that I forget to send this little patch to make checkentry 
static.

Best regards,

 			Krzysztof Olędzki

[-- Attachment #2: Type: TEXT/PLAIN, Size: 232 bytes --]

--- ipt_set.c	2007-08-28 13:29:12.000000000 +0200
+++ ipt_set.c-1	2008-05-30 11:58:02.000000000 +0200
@@ -57,7 +57,7 @@
 }
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
-bool
+static bool
 #else
 static int
 #endif

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

* Re: [patch] ipset 2.3.0 segfault on '-U :all: {:all:|:default:}
  2008-05-30  7:18 ` Jozsef Kadlecsik
  2008-05-30 10:02   ` Krzysztof Oledzki
@ 2008-06-01 21:14   ` Patrick McHardy
  1 sibling, 0 replies; 4+ messages in thread
From: Patrick McHardy @ 2008-06-01 21:14 UTC (permalink / raw)
  To: Jozsef Kadlecsik; +Cc: Tom Eastep, netfilter-devel

Jozsef Kadlecsik wrote:
> On Thu, 29 May 2008, Tom Eastep wrote:
> 
>> Segfault occurs at line 1641 as a result of dereferencing a null pointer while
>> testing the set type for iptreemap.
>>
>> Patch attached.
> 
> Thank you the report and the patch: I'll apply it as soon as the svn->git 
> migration of ipset source is ready.

Don't let this stop you, doing a final resync is no problem.

^ 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.