From: Florian Westphal <fw@strlen.de>
To: Sunny73Cr <Sunny73Cr@protonmail.com>
Cc: "netfilter@vger.kernel.org" <netfilter@vger.kernel.org>
Subject: Re: Raw Payload Expressions - out of bounds write?
Date: Sun, 26 Jan 2025 14:50:21 +0100 [thread overview]
Message-ID: <20250126135021.GB3073@breakpoint.cc> (raw)
In-Reply-To: <Bp_PH3aO9-d7-Av1SaQGtAgrvHaPwr0l5r_aR31_U8l5IvbSFaLJ1lXI3vFBV46Xb4IxK-tP-HkcSFS-2KCLyYfRibcIkioxjdem46U0IB8=@protonmail.com>
Sunny73Cr <Sunny73Cr@protonmail.com> wrote:
> @ih,58,6 set 0 \
> @ih,86,6 set 0 \
> @ih,170,22 set 0 \
> 3. Output ruleset (/usr/sbin/nft list rulset):
>
> chain output {
> type filter hook output priority filter; policy accept;
> @ih,48,16 set @ih,48,16 & 0x3f \
> @ih,80,16 set @ih,80,16 & 0x3f0 \
> @ih,160,32 set @ih,160,32 @0x3fffff \
> accept;
> }
>
> The mask appears correct for the first re-write, but subsequent re-writes appear to be too large.
What do you mean?
Please elaborate as what is wrong here in listing 3.
The nft interpreter cannot load individual bits,
the length/size has to be byte aligned.
6 bits from offset 86 straddles two bytes (bits 86-7,88-91).
22 from offset 170 touch 4 bytes: bits 168-169, 170-177, 178-185,
186-195.
next prev parent reply other threads:[~2025-01-26 13:50 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 [this message]
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
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=20250126135021.GB3073@breakpoint.cc \
--to=fw@strlen.de \
--cc=Sunny73Cr@protonmail.com \
--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 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.