From: Florian Westphal <fw@strlen.de>
To: timothee.cocault@orange.com
Cc: Pablo Neira Ayuso <pablo@netfilter.org>,
Florian Westphal <fw@strlen.de>,
"netfilter-devel@vger.kernel.org"
<netfilter-devel@vger.kernel.org>
Subject: Re: Bug: ebtables snat drops small packets
Date: Wed, 14 Oct 2020 11:48:15 +0200 [thread overview]
Message-ID: <20201014094815.GB16895@breakpoint.cc> (raw)
In-Reply-To: <19748_1602667914_5F86C589_19748_131_22_585B71F7B267D04784B84104A88F7DEE0DB50179@OPEXCAUBM34.corporate.adroot.infra.ftgroup>
timothee.cocault@orange.com <timothee.cocault@orange.com> wrote:
> Hi !
>
> I noticed a bug when using the snat module of ebtables.
> If the ethernet payload of a packet is less than 12 bytes, the packet gets dropped.
>
> I traced it down to this commit which changes calls to `skb_make_writable` to `skb_ensure_writable` :
> https://github.com/torvalds/linux/commit/c1a8311679014a79b04c039e32bde34fb68952fd
>
> The diff gives a clear hint of the bug. For example, in `net/bridge/netfilter/ebt_snat.c` :
>
> - if (!skb_make_writable(skb, 0))
> + if (skb_ensure_writable(skb, ETH_ALEN * 2))
> return EBT_DROP;
Can you send a formal patch that fixes this up for all callers?
Thanks.
prev parent reply other threads:[~2020-10-14 9:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-14 9:31 Bug: ebtables snat drops small packets timothee.cocault
2020-10-14 9:48 ` Florian Westphal [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=20201014094815.GB16895@breakpoint.cc \
--to=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=timothee.cocault@orange.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).