Netdev List
 help / color / mirror / Atom feed
From: Philipp Sudakas <filzador@gmail.com>
To: Ronak Doshi <ronak.doshi@broadcom.com>,
	Broadcom internal kernel review list
	<bcm-kernel-feedback-list@broadcom.com>
Cc: netdev@vger.kernel.org, Philipp Sudakas <filzador@gmail.com>
Subject: [PATCH net 0/2] vmxnet3: fix native XDP crash on oversized frames and XDP loss on reset
Date: Sun, 22 Nov 2026 03:28:45 +0300	[thread overview]
Message-ID: <20261122002847.616-1-filzador@gmail.com> (raw)

Two bugs in native XDP mode of vmxnet3. The first lets a single frame
from any host on the same L2 segment crash the guest; the second makes
the driver silently stop running XDP after any device reset and leaks
the program reference.

Patch 1: a frame that does not fit in one XDP rx buffer (sop without
eop) reaches the skb path, which takes the page_pool page for an skb:
kernel BUG in skb_put(). With MTU 1500 and an XDP program attached, a
single untagged frame of 1523..1526 bytes is enough.

Patch 2: vmxnet3_rq_cleanup_all() clears xdp_bpf_prog on every quiesce
(MTU change, down/up, ring resize, reset). XDP stops being called while
the program is still reported as attached, and it is never released.

Reproduced with stock modules on Debian kernels 6.12.113, 6.12.117 and
7.2.12 (7.2.12 untainted), VMware virtual hardware version 20. Both
code paths are unchanged in mainline as of e572847ee4d0. A small
reproducer (raw frame sender and an XDP_PASS counter program) is
available on request.

Testing:
- The same changes, backported to 6.12.113, were tested on the same
  setup: frames of MTU + 23 and MTU + 30 (VLAN tagged) are dropped and
  counted in drop_total at MTU 1400 and 1500; frames up to MTU + 22
  still reach XDP; after an MTU change, down/up and an rx ring resize
  the same program keeps running; MTU 9000 is refused while XDP is
  attached; after detach the program is freed. A stream of 5000
  oversized frames mixed with 5000 normal ones gave exactly 5000 XDP
  passes and 5000 drops, with no kernel warnings. That test module also
  carried a separate change to NAPI budget accounting for non-PASS XDP
  verdicts, which will be sent on its own.
- On mainline the patches apply to e572847ee4d0 and vmxnet3_drv.c
  builds with W=1 without warnings; they were not run-tested on a
  mainline kernel.

Known limit not addressed here: with an MTU between about 3051 and
VMXNET3_XDP_MAX_MTU, normal frames already need more than one buffer,
and with this series they are dropped instead of crashing.

The problems were found and analysed, and the patches drafted, with
the help of an AI coding assistant; reproduction and testing were run
on the reporter's lab systems.

REPORTER NAME (2):
  vmxnet3: drop XDP frames that do not fit in one rx buffer
  vmxnet3: keep the XDP program across device resets

 drivers/net/vmxnet3/vmxnet3_drv.c | 24 ++++++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)

-- 
2.47.3


             reply	other threads:[~2026-11-22  0:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-22  0:28 Philipp Sudakas [this message]
2026-11-22  0:28 ` [PATCH net 1/2] vmxnet3: drop XDP frames that do not fit in one rx buffer Philipp Sudakas
2026-11-22  0:28 ` [PATCH net 2/2] vmxnet3: keep the XDP program across device resets Philipp Sudakas

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=20261122002847.616-1-filzador@gmail.com \
    --to=filzador@gmail.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=ronak.doshi@broadcom.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