All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix nf_conntrack_netlink expectation dumping/event notification
@ 2006-01-13  1:41 Pablo Neira Ayuso
  2006-01-13  8:58 ` Patrick McHardy
  0 siblings, 1 reply; 21+ messages in thread
From: Pablo Neira Ayuso @ 2006-01-13  1:41 UTC (permalink / raw)
  To: Netfilter Development Mailinglist; +Cc: Patrick McHardy, Yasuyuki Kozakai

[-- Attachment #1: Type: text/plain, Size: 692 bytes --]

Hi Yasuyuki,

Currently we get an oops with nf_conntrack_netlink + nf_conntrack_ftp
because l3num is set to 0xFFFF for the expectation mask. At first sight,
this is correct because l3num is u_int16_t, but the size of the layer-3
array of protocol handlers is AF_MAX (32).

I could add some checking to verify that l3num is less than 32 in
nf_conntrack_find_l3proto, but such checking is only required for
nf_conntrack_ftp and further application helpers. AFAICS, this is the
cleanest way to fix this problem. Any other suggestion?

Cheers,
Pablo

-- 
The dawn of the fourth age of Linux firewalling is coming; a time of
great struggle and heroic deeds -- J.Kadlecsik got inspired by J.Morris

[-- Attachment #2: x1 --]
[-- Type: text/plain, Size: 849 bytes --]

Set l3num to 0x1F (32) in expectation masks since the size of the layer 3 
procotol handler array is AF_MAX. This fixes a panic at expectation dumping
and event notification.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>

Index: netfilter-2.6.14.git/net/netfilter/nf_conntrack_ftp.c
===================================================================
--- netfilter-2.6.14.git.orig/net/netfilter/nf_conntrack_ftp.c	2006-01-08 21:24:44.000000000 +0100
+++ netfilter-2.6.14.git/net/netfilter/nf_conntrack_ftp.c	2006-01-08 21:33:52.000000000 +0100
@@ -574,7 +574,7 @@ static int help(struct sk_buff **pskb,
 	exp->tuple.dst.protonum = IPPROTO_TCP;
 
 	exp->mask = (struct nf_conntrack_tuple)
-		    { .src = { .l3num = 0xFFFF,
+		    { .src = { .l3num = 0x001F,
 			       .u = { .tcp = { 0 }},
 			     },
 		      .dst = { .protonum = 0xFF,

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

end of thread, other threads:[~2006-02-08 12:25 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-13  1:41 [PATCH] fix nf_conntrack_netlink expectation dumping/event notification Pablo Neira Ayuso
2006-01-13  8:58 ` Patrick McHardy
2006-01-13  9:02   ` Yasuyuki KOZAKAI
     [not found]   ` <200601130902.k0D92fVM026246@toshiba.co.jp>
2006-01-13  9:04     ` Patrick McHardy
2006-01-13  9:38       ` Yasuyuki KOZAKAI
     [not found]       ` <200601130938.k0D9c6Yo007986@toshiba.co.jp>
2006-01-13  9:45         ` Patrick McHardy
2006-01-13 10:12           ` YOSHIFUJI Hideaki / 吉藤英明
2006-01-13 10:44             ` Patrick McHardy
     [not found]       ` <200601130938.k0D9c6ud007984@toshiba.co.jp>
2006-01-13 11:17         ` Pablo Neira Ayuso
2006-01-15 13:07           ` Yasuyuki KOZAKAI
2006-01-20  4:57             ` expectation mask handling in nfctnetlink (Was Re: [PATCH] fix nf_conntrack_netlink expectation dumping/event notification) Yasuyuki KOZAKAI
2006-02-01  2:09               ` Pablo Neira Ayuso
2006-02-01 11:04                 ` Patrick McHardy
     [not found]                   ` <200602011335.k11DZHwj018072@toshiba.co.jp>
2006-02-02  0:45                     ` [RFC] [PATCH] Fix expectation mask dumping (Was Re: expectation mask handling in nfctnetlink) Pablo Neira Ayuso
2006-02-02 10:30                       ` [RFC] [PATCH] Fix expectation mask dumping Yasuyuki KOZAKAI
2006-02-05 23:54                       ` [PATCH] Fix expectation mask dumping, take #2 Pablo Neira Ayuso
2006-02-06  2:15                         ` Yasuyuki KOZAKAI
2006-02-08 11:26                         ` Yasuyuki KOZAKAI
     [not found]                         ` <200602081126.k18BQWLj029476@toshiba.co.jp>
2006-02-08 12:25                           ` Pablo Neira Ayuso
2006-02-01 13:16                 ` expectation mask handling in nfctnetlink Yasuyuki KOZAKAI
2006-02-01 13:35             ` Yasuyuki KOZAKAI

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.