Linux Netfilter development
 help / color / mirror / Atom feed
From: Fernando Fernandez Mancera <fmancera@suse.de>
To: Ren Wei <weir@nebusec.ai>, netfilter-devel@vger.kernel.org
Cc: pablo@netfilter.org, fw@strlen.de, phil@nwl.cc,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, horms@kernel.org, luciano.coelho@nokia.com,
	kaber@trash.net, quic_manojbm@quicinc.com,
	quic_subashab@quicinc.com, vega@nebusec.ai, rakukuip@gmail.com
Subject: Re: [PATCH nf 1/1] netfilter: xt_IDLETIMER: validate label before debug logging in checkentry
Date: Tue, 18 Aug 2026 10:05:27 +0200	[thread overview]
Message-ID: <9f86fb45-8784-461e-9398-a0a930bea87c@suse.de> (raw)
In-Reply-To: <b139065e9f62868ac5ed0900faf1dcd13c7e68f8.1786933680.git.rakukuip@gmail.com>

On 8/18/26 3:56 AM, Ren Wei wrote:
> From: Luxiao Xu <rakukuip@gmail.com>
> 
> Both idletimer_tg_checkentry() and idletimer_tg_checkentry_v1() invoke
> pr_debug() with "%s" on info->label before idletimer_tg_helper() verifies
> that the 28-byte label is properly NUL-terminated.
> 
> If a user-supplied label is not NUL-terminated, printk format string
> parsing reads past the end of the allocated target structure until it
> encounters a zero byte. In builds with DEBUG enabled or when dynamic debug
> is active for this callsite, this triggers a slab-out-of-bounds read
> (detected by KASAN) and can disclose adjacent kernel memory into the logs.
> 
> Fix this by moving the pr_debug() calls after idletimer_tg_helper() has
> successfully validated the label string.
> 
> Fixes: 0902b469bd25 ("netfilter: xtables: idletimer target implementation")
> Fixes: 68983a354a65 ("netfilter: xtables: Add snapshot of hardidletimer target")
> Cc: stable@vger.kernel.org
> Reported-by: Vega <vega@nebusec.ai>
> Assisted-by: Codex:gpt-5.4
> Signed-off-by: Luxiao Xu <rakukuip@gmail.com>
> Signed-off-by: Ren Wei <weir@nebusec.ai>
> ---

Reviewed-by: Fernando Fernandez Mancera <fmancera@suse.de>

Thanks!

  reply	other threads:[~2026-08-18  8:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-18  1:56 [PATCH nf 0/1] netfilter: xt_IDLETIMER: fix out-of-bounds heap read in checkentry Ren Wei
2026-08-18  1:56 ` [PATCH nf 1/1] netfilter: xt_IDLETIMER: validate label before debug logging " Ren Wei
2026-08-18  8:05   ` Fernando Fernandez Mancera [this message]
2026-08-18 10:14   ` Florian Westphal
2026-08-18  8:04 ` [PATCH nf 0/1] netfilter: xt_IDLETIMER: fix out-of-bounds heap read " Pablo Neira Ayuso

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=9f86fb45-8784-461e-9398-a0a930bea87c@suse.de \
    --to=fmancera@suse.de \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=fw@strlen.de \
    --cc=horms@kernel.org \
    --cc=kaber@trash.net \
    --cc=kuba@kernel.org \
    --cc=luciano.coelho@nokia.com \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pablo@netfilter.org \
    --cc=phil@nwl.cc \
    --cc=quic_manojbm@quicinc.com \
    --cc=quic_subashab@quicinc.com \
    --cc=rakukuip@gmail.com \
    --cc=vega@nebusec.ai \
    --cc=weir@nebusec.ai \
    /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