Netdev List
 help / color / mirror / Atom feed
From: Fang Xieyan <fangxy@xiaopeng.com>
To: netdev-bot+sinfo@kernel.org
Cc: jhs@mojatatu.com, jiri@resnulli.us, davem@davemloft.net,
	edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com,
	horms@kernel.org, eyal.birger@gmail.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, liuwb@xiaopeng.com
Subject: Re: [PATCH] net: sched: em_ipt: validate hook value from netlink
Date: Mon, 26 Oct 2026 17:30:15 +0800	[thread overview]
Message-ID: <20261026093015.49377-1-fangxy@xiaopeng.com> (raw)
In-Reply-To: <20261026090717.41597-1-fangxy@xiaopeng.com>

Hi,

Thanks for the automated review. Here's the additional information:

**How the issue was discovered:**
Identified through automated security scanning tools during internal 
security research, followed by manual code review to confirm the 
vulnerability and assess its impact.

**Whether the issue was actually triggered:**
Yes, successfully reproduced using QEMU/KVM with a kernel built with 
CONFIG_UBSAN=y, CONFIG_UBSAN_TRAP=y, and CONFIG_UBSAN_SHIFT=y.

**Symptoms:**
The reproducer creates a TC basic filter with em_ipt match using addrtype 
revision 1 and hook value 42 (out of valid NF_INET_* range 0-4). This 
triggers the following kernel Oops in check_match():

  Oops: invalid opcode: 0000 [#1] SMP NOPTI
  RIP: 0010:check_match.cold+0x0/0x2
  RCX: 000000000000002a    <- 0x2a = 42 (the hook value from PoC)

Disassembly confirms the ud2 trap instruction at check_match.cold+0x0 
corresponds to the UBSAN check for the shift operation "1 << im->hook".

Without UBSAN, on x86 the shift instruction may mask the count to low 
5 bits, yielding hook_mask = 0x400, which does not overlap the standard 
hook bits checked by the addrtype interface-limit validation.

Best regards,
Fang Xieyan

  parent reply	other threads:[~2026-10-26  9:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-26  9:07 [PATCH] net: sched: em_ipt: validate hook value from netlink Fang Xieyan
2026-10-26  9:10 ` netdev-bot+sinfo
2026-10-26  9:30 ` Fang Xieyan [this message]
2026-10-28 11:50 ` patchwork-bot+netdevbpf

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=20261026093015.49377-1-fangxy@xiaopeng.com \
    --to=fangxy@xiaopeng.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=eyal.birger@gmail.com \
    --cc=horms@kernel.org \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liuwb@xiaopeng.com \
    --cc=netdev-bot+sinfo@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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