Linux Netfilter development
 help / color / mirror / Atom feed
From: Phil Sutter <phil@nwl.cc>
To: Ren Wei <enjou1224z@gmail.com>
Cc: netfilter-devel@vger.kernel.org, pablo@netfilter.org,
	fw@strlen.de, davem@davemloft.net, edumazet@google.com,
	pabeni@redhat.com, horms@kernel.org, jack.ma@alliedtelesis.co.nz,
	yuantan098@gmail.com, zcliangcn@gmail.com,
	dstsmallbird@foxmail.com, bronzed_45_vested@icloud.com
Subject: Re: [PATCH nf 1/1] netfilter: xt_connmark: reject invalid shift parameters
Date: Fri, 3 Jul 2026 11:00:57 +0200	[thread overview]
Message-ID: <akd6SfXJ40lVqqut@orbyte.nwl.cc> (raw)
In-Reply-To: <e06220ea18c49ec3d6bea1b42fe05b4ff152bd37.1782853619.git.bronzed_45_vested@icloud.com>

On Fri, Jul 03, 2026 at 01:04:46PM +0800, Ren Wei wrote:
> From: Wyatt Feng <bronzed_45_vested@icloud.com>
> 
> Revision 2 of the CONNMARK target accepts user-controlled shift
> parameters and applies them to 32-bit mark values in
> connmark_tg_shift().
> 
> A shift_bits value of 32 or more triggers an undefined-shift bug when
> the rule is evaluated. Invalid shift_dir values are also accepted and
> silently fall back to the left-shift path.
> 
> Reject invalid revision-2 shift parameters in connmark_tg_check() so
> malformed rules fail at installation time, before they can reach the
> packet path.
> 
> Fixes: 472a73e00757 ("netfilter: xt_conntrack: Support bit-shifting for CONNMARK & MARK targets.")
> Cc: stable@vger.kernel.org
> Reported-by: Yuan Tan <yuantan098@gmail.com>
> Reported-by: Zhengchuan Liang <zcliangcn@gmail.com>
> Reported-by: Xin Liu <dstsmallbird@foxmail.com>
> Assisted-by: Codex:GPT-5.4
> Signed-off-by: Wyatt Feng <bronzed_45_vested@icloud.com>
> Reviewed-by: Ren Wei <enjou1224z@gmail.com>

Reviewed-by: Phil Sutter <phil@nwl.cc>

      reply	other threads:[~2026-07-03  9:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1782853619.git.bronzed_45_vested@icloud.com>
2026-07-03  5:04 ` [PATCH nf 1/1] netfilter: xt_connmark: reject invalid shift parameters Ren Wei
2026-07-03  9:00   ` Phil Sutter [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=akd6SfXJ40lVqqut@orbyte.nwl.cc \
    --to=phil@nwl.cc \
    --cc=bronzed_45_vested@icloud.com \
    --cc=davem@davemloft.net \
    --cc=dstsmallbird@foxmail.com \
    --cc=edumazet@google.com \
    --cc=enjou1224z@gmail.com \
    --cc=fw@strlen.de \
    --cc=horms@kernel.org \
    --cc=jack.ma@alliedtelesis.co.nz \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pablo@netfilter.org \
    --cc=yuantan098@gmail.com \
    --cc=zcliangcn@gmail.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