netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Eyal Birger <eyal.birger@gmail.com>
Cc: kadlec@netfilter.org, fw@strlen.de, davem@davemloft.net,
	netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
	netdev@vger.kernel.org,
	Shmulik Ladkani <shmulik.ladkani@gmail.com>
Subject: Re: [net,v2] netfilter: nat: fix ICMP header corruption on ICMP errors
Date: Thu, 16 Jan 2020 15:08:57 +0100	[thread overview]
Message-ID: <20200116140857.ak3f744ewnlxdwfq@salvia> (raw)
In-Reply-To: <20200114080350.4693-1-eyal.birger@gmail.com>

On Tue, Jan 14, 2020 at 10:03:50AM +0200, Eyal Birger wrote:
> Commit 8303b7e8f018 ("netfilter: nat: fix spurious connection timeouts")
> made nf_nat_icmp_reply_translation() use icmp_manip_pkt() as the l4
> manipulation function for the outer packet on ICMP errors.
> 
> However, icmp_manip_pkt() assumes the packet has an 'id' field which
> is not correct for all types of ICMP messages.
> 
> This is not correct for ICMP error packets, and leads to bogus bytes
> being written the ICMP header, which can be wrongfully regarded as
> 'length' bytes by RFC 4884 compliant receivers.
> 
> Fix by assigning the 'id' field only for ICMP messages that have this
> semantic.

Applied, thanks.

      parent reply	other threads:[~2020-01-16 14:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-14  8:03 [net,v2] netfilter: nat: fix ICMP header corruption on ICMP errors Eyal Birger
2020-01-14 11:31 ` Florian Westphal
2020-01-16 14:08 ` Pablo Neira Ayuso [this message]

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=20200116140857.ak3f744ewnlxdwfq@salvia \
    --to=pablo@netfilter.org \
    --cc=coreteam@netfilter.org \
    --cc=davem@davemloft.net \
    --cc=eyal.birger@gmail.com \
    --cc=fw@strlen.de \
    --cc=kadlec@netfilter.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=shmulik.ladkani@gmail.com \
    /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).