All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nft] evaluate: fix export length and data corruption
Date: Mon, 16 Jan 2017 21:49:10 +0100	[thread overview]
Message-ID: <20170116204910.GA19547@salvia> (raw)
In-Reply-To: <1484573912-23612-1-git-send-email-fw@strlen.de>

On Mon, Jan 16, 2017 at 02:38:32PM +0100, Florian Westphal wrote:
> Pablo reported that ipv6 tests would fail on some systems:
> WARNING: line: 5: 'src/nft add rule --debug=netlink ip6 test-ip6 input iif "lo" ip6 flowlabel set 0':
> '[ bitwise reg 1 = (reg=1 & 0x000000f0 ) ^ 0x00000000 ]' mismatches
> '[ bitwise reg 1 = (reg=1 & 0x00000000 ) ^ 0x00000000 ]'
>                                     ^ should be 'f'
> 
> Problem is that mpz_export_data expects the size of the output
> buffer in bytes, but this gave bit-based size.
> 
> Then, when mpz_export_data clears the output buffer it will
> also clear 8 extra bytes on stack; depending on compiler version (stack
> layout) this will then clear the bitmask value that we want to export.
> 
> Fixes: 78936d50f306c ("evaluate: add support to set IPv6 non-byte header fields")
> Reported-by: Pablo Neira Ayuso <pablo@netfilter.org>
> Signed-off-by: Florian Westphal <fw@strlen.de>

This fixes my tests, thanks Florian.

Tested-by: Pablo Neira Ayuso <pablo@netfilter.org>

      reply	other threads:[~2017-01-16 20:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-16 13:38 [PATCH nft] evaluate: fix export length and data corruption Florian Westphal
2017-01-16 20:49 ` 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=20170116204910.GA19547@salvia \
    --to=pablo@netfilter.org \
    --cc=fw@strlen.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.