netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Paul Guo <ggang@tilera.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH] possible unaligned packet header caused by ip_route_me_harder()->pskb_expand_head()
Date: Mon, 21 Nov 2011 18:47:11 +0100	[thread overview]
Message-ID: <20111121174711.GB4193@1984> (raw)
In-Reply-To: <4EC0F4E6.50103@tilera.com>

On Mon, Nov 14, 2011 at 07:00:54PM +0800, Paul Guo wrote:
> This patch tries to fix the following issue in netfilter:
> ip_route_me_harder()->pskb_expand_head() rellocates new header with
> additional head room which can break the alignment of the original
> packet header.
> 
> In one of my NAT test case, the NIC port for internal hosts is
> configured with vlan and the port for external hosts is with
> general configuration. If we ping an external "unknown" hosts from an
> internal host, an icmp packet will be sent. We find that in
> icmp_send()->...->ip_route_me_harder()->pskb_expand_head(), hh_len=18
> and current headroom (skb_headroom(skb)) of the packet is 16. After
> calling pskb_expand_head() the packet header becomes to be unaligned
> and then our system (arch/tile) panics immediately.
> 
> Here is the patch:
> 
> Signed-off-by: Paul Guo <ggang@tilera.com>

Applied to my nf branch:

http://1984.lsi.us.es/git/?p=net/.git;a=summary

Thanks everyone.

  reply	other threads:[~2011-11-21 17:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-08 15:02 unaligned ip header due to ip_route_me_harder()->pskb_expand_head() Paul Guo
2011-11-08 16:58 ` Eric Dumazet
2011-11-09  9:33   ` Paul Guo
2011-11-09  9:48     ` Eric Dumazet
2011-11-10  7:33       ` Paul Guo
2011-11-13 17:02         ` Pablo Neira Ayuso
2011-11-14  8:33           ` [PATCH] possible unaligned packet header caused by ip_route_me_harder()->pskb_expand_head() Paul Guo
2011-11-14  9:46             ` Eric Dumazet
2011-11-14 11:00               ` Paul Guo
2011-11-21 17:47                 ` Pablo Neira Ayuso [this message]
2011-11-16 16:54               ` Pablo Neira Ayuso
2011-11-21 10:30                 ` Eric Dumazet

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=20111121174711.GB4193@1984 \
    --to=pablo@netfilter.org \
    --cc=eric.dumazet@gmail.com \
    --cc=ggang@tilera.com \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).