From: Shan Wei <shanwei@cn•fujitsu.com>
To: nicolas.dichtel@6wind•com,
"netdev@vger•kernel.org" <netdev@vger•kernel.org>,
netfilter-devel@vger•kernel.org,
Patrick McHardy <kaber@trash•net>
Cc: David Miller <davem@davemloft•net>
Subject: Re: [PATCH] netfilter: ipv6: fix overlap check for fragments
Date: Fri, 12 Nov 2010 15:47:24 +0800 [thread overview]
Message-ID: <4CDCF10C.5060602@cn.fujitsu.com> (raw)
In-Reply-To: <4CD3F0F8.5030205@cn.fujitsu.com>
Hi Patrick:
Would you apply this to your tree. The similar patch for ipv6 has been
applied by David .
See http://git.kernel.org/?p=linux/kernel/git/davem/net-2.6.git;a=commit;h=f46421416fb6b91513fb687d6503142cd99034a5
Shan Wei wrote, at 11/05/2010 07:56 PM:
> The type of FRAG6_CB(prev)->offset is int, skb->len is *unsigned* int,
> and offset is int.
>
> Without this patch, type conversion occurred to this expression, when
> (FRAG6_CB(prev)->offset + prev->len) is less than offset.
>
>
> Signed-off-by: Shan Wei <shanwei@cn•fujitsu.com>
> ---
> net/ipv6/netfilter/nf_conntrack_reasm.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c
> index 3a3f129..79d43aa 100644
> --- a/net/ipv6/netfilter/nf_conntrack_reasm.c
> +++ b/net/ipv6/netfilter/nf_conntrack_reasm.c
> @@ -286,7 +286,7 @@ found:
>
> /* Check for overlap with preceding fragment. */
> if (prev &&
> - (NFCT_FRAG6_CB(prev)->offset + prev->len) - offset > 0)
> + (NFCT_FRAG6_CB(prev)->offset + prev->len) > offset)
> goto discard_fq;
>
> /* Look for overlap with succeeding segment. */
--
Best Regards
-----
Shan Wei
next prev parent reply other threads:[~2010-11-12 7:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-05 11:56 [PATCH] netfilter: ipv6: fix overlap check for fragments Shan Wei
2010-11-12 7:47 ` Shan Wei [this message]
2010-11-12 7:52 ` 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=4CDCF10C.5060602@cn.fujitsu.com \
--to=shanwei@cn$(echo .)fujitsu.com \
--cc=davem@davemloft$(echo .)net \
--cc=kaber@trash$(echo .)net \
--cc=netdev@vger$(echo .)kernel.org \
--cc=netfilter-devel@vger$(echo .)kernel.org \
--cc=nicolas.dichtel@6wind$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox