From: Stephane Chazelas Subject: Re: [bug+patch] SCTP and chunk types over 0x1f Date: Mon, 25 Jun 2007 15:15:06 +0100 Message-ID: <20070625141506.GX20467@artesyncp.com> References: <20070622151940.GA20467@artesyncp.com> <467FC5CB.9080608@trash.net> <20070625135040.GV20467@artesyncp.com> <467FCA13.5050401@trash.net> <20070625140839.GW20467@artesyncp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netfilter-devel@lists.netfilter.org To: Patrick McHardy Return-path: Content-Disposition: inline In-Reply-To: <20070625140839.GW20467@artesyncp.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: netfilter-devel-bounces@lists.netfilter.org Errors-To: netfilter-devel-bounces@lists.netfilter.org List-Id: netfilter-devel.vger.kernel.org On Mon, Jun 25, 2007 at 03:08:39PM +0100, Stephane Chazelas wrote: > On Mon, Jun 25, 2007 at 03:58:43PM +0200, Patrick McHardy wrote: > [...] > > > That's just a matter of removing the first change: > > > > > > Does it stay completely compatible (modulo fixed bugs) then? > > AFAICT, yes (though I've not tested it). I don't know if the > kernel needs to be rebuilt for the bug to be fixed (that is, I > don't know whether in the kernel code there are some calls to > the SCTP_CHUNKMAP_IS_ALL_SET and cie macros with non-array > arguments, I don't think there are). [...] actually yes, the kernel is affected. See "return SCTP_CHUNKMAP_IS_CLEAR(chunkmap)" for instance in match_packet() in net/netfilter/xt_sctp.c, chunkmap is u_int32_t*, so ARRAY_SIZE(chunkmap) will return sizeof(u_int32_t*)/sizeof(u_int32_t) that is probably 1 or 2 instead of 64 or 8. The fixed iptable should work with either a fixed or non-fixed kernel. However, with a non-fixed kernel, it will not fix the bug completely. Cheers, Stephane