From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel@vger.kernel.org, john.stultz@linaro.org
Subject: Re: [PATCH nf] netfilter: x_tables: don't reject valid target size on some architectures
Date: Thu, 2 Jun 2016 14:10:24 +0200 [thread overview]
Message-ID: <20160602121024.GA13294@salvia> (raw)
In-Reply-To: <1464739484-7817-1-git-send-email-fw@strlen.de>
On Wed, Jun 01, 2016 at 02:04:44AM +0200, Florian Westphal wrote:
> Quoting John Stultz:
> In updating a 32bit arm device from 4.6 to Linus' current HEAD, I
> noticed I was having some trouble with networking, and realized that
> /proc/net/ip_tables_names was suddenly empty.
> Digging through the registration process, it seems we're catching on the:
>
> if (strcmp(t->u.user.name, XT_STANDARD_TARGET) == 0 &&
> target_offset + sizeof(struct xt_standard_target) != next_offset)
> return -EINVAL;
>
> Where next_offset seems to be 4 bytes larger then the
> offset + standard_target struct size.
>
> next_offset needs to be aligned via XT_ALIGN (so we can access all members
> of ip(6)t_entry struct).
>
> This problem didn't show up on i686 as it only needs 4-byte alignment for
> u64, but iptables userspace on other 32bit arches does insert extra padding.
Applied, thanks Florian.
prev parent reply other threads:[~2016-06-02 12:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-01 0:04 [PATCH nf] netfilter: x_tables: don't reject valid target size on some architectures Florian Westphal
2016-06-02 12:10 ` 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=20160602121024.GA13294@salvia \
--to=pablo@netfilter.org \
--cc=fw@strlen.de \
--cc=john.stultz@linaro.org \
--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).