Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Florian Westphal <fw@strlen.de>
Cc: Sunny73Cr <Sunny73Cr@protonmail.com>,
	"netfilter@vger.kernel.org" <netfilter@vger.kernel.org>
Subject: Re: Raw Payload Expressions - out of bounds write?
Date: Tue, 28 Jan 2025 13:41:37 +0100	[thread overview]
Message-ID: <Z5jQgcbCXiLyPwV-@calendula> (raw)
In-Reply-To: <20250128003706.GB29891@breakpoint.cc>

On Tue, Jan 28, 2025 at 01:37:06AM +0100, Florian Westphal wrote:
> Sunny73Cr <Sunny73Cr@protonmail.com> wrote:
> > > Please elaborate as what is wrong here in listing 3.
> > 
> > Within the second line of the rule (@ih,80,16 set @ih,80,16 & 0x3f0 \)
> > 
> > The mask 0x3f0 equates to 1,008 in decimal.
> > (3 * 16**2) + (15 * 16**1) + (0 * 16^0) = 1,008
> > Here '**' indicates exponent.
> > 
> > 1,008 is far larger than the 34 bit range that I covered.
> 
> Sigh.  Why did you not say something like:
> 
> The mask is provided as '0x3f0' in the listing, but I had expected
> 0xfc0f, as only 6 bits should be cleared, but the mask KEEPS 6 bits.
> 
> It would have saved me a headache figuring out bug you refer to.
> I am not a mind reader :-/
> 
> Use --debug=netlink, it looks like its a display bug.
> 
> I'll have a look.

It looks like netlink_delinearize is missing code to compact the
expression.

  parent reply	other threads:[~2025-01-28 12:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-23  3:31 Raw Payload Expressions - out of bounds write? Sunny73Cr
2025-01-26 13:50 ` Florian Westphal
2025-01-26 18:08   ` Sunny73Cr
2025-01-28  0:37     ` Florian Westphal
2025-01-28  4:19       ` Sunny73Cr
2025-01-28 12:02         ` Jeremy Sowden
2025-01-28 12:12           ` Sunny73Cr
2025-01-28 12:41       ` Pablo Neira Ayuso [this message]
2025-01-30 11:27         ` Sunny73Cr
2025-02-08 20:26           ` Sunny73Cr
2025-02-09  1:47             ` Florian Westphal
2025-02-09  3:12               ` Sunny73Cr
2025-02-09 22:23                 ` Pablo Neira Ayuso
2025-02-09 22:45                   ` Sunny73Cr
2025-12-02  5:22                     ` Sunny73Cr

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=Z5jQgcbCXiLyPwV-@calendula \
    --to=pablo@netfilter.org \
    --cc=Sunny73Cr@protonmail.com \
    --cc=fw@strlen.de \
    --cc=netfilter@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