All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/8] net/zxdh: fix some issues reported by OSS scanner
@ 2026-11-07  3:04 Junlong Wang
  2026-11-07  3:04 ` [PATCH v1 1/8] net/zxdh: reject out-of-range VLAN ID from VF Junlong Wang
                   ` (9 more replies)
  0 siblings, 10 replies; 20+ messages in thread
From: Junlong Wang @ 2026-11-07  3:04 UTC (permalink / raw)
  To: stephen; +Cc: dev, Junlong Wang


[-- Attachment #1.1.1: Type: text/plain, Size: 2386 bytes --]

v1:
  This series fixes issues in the zxdh PF/VF mailbox handling that were
  found by a code scan of the driver, reported to us by the DPDK
  community. All of them are on the PF receive path, where fields of a
  message written by a VF into the shared BAR window are trusted more
  than they should be, plus two ordinary local bugs the scan found on
  the way:

- The dispatcher hands msg_head vport/pcieid to the handlers without
  comparing them with the sender, so a request can be aimed at any
  port (patch 3).
- The header module_id is checked as 8-bit but indexes a table as
  16-bit, and the async ack msg_id indexes the 256-entry seqid table
  without a bound check; both are out-of-bounds accesses up to a
  function call through a wild pointer (patches 7, 8).
- The receive buffer is allocated with the sender-declared length but
  accessed as a full struct, corrupting the heap; and the async
  no-ack exit leaks the buffer, allowing a guest to exhaust the PF
  heap (patches 5, 6).
- An uninitialised DTB entry is freed on a flow query error path,
  and an uninitialised multicast delete flag makes the PF delete the
  multicast entries of every port whenever one port leaves a group,
  with no attacker involved; the latter is a v25.11 regression
  (patches 2, 4).
- A VLAN id above 4095 from a VF message turns into an out-of-range
  ERAM row index (patch 1).

  The sender check of patch 3 was verified on hardware; it stops at
  binding the request to a VF of the PF, a VF forging the identity of a
  sibling VF of the same PF is left to device-side protection that is
  planned. Each patch has been checked to apply on the current main
  branch.

Junlong Wang (8):
  net/zxdh: reject out-of-range VLAN ID from VF
  net/zxdh: initialise DTB entry in flow query
  net/zxdh: refuse PF mailbox requests not naming a VF of this PF
  net/zxdh: initialise multicast delete flag
  net/zxdh: free receive buffer on the async no-ack exit
  net/zxdh: allocate a zeroed full-size payload buffer
  net/zxdh: check full 16-bit module id of received messages
  net/zxdh: check msg id before indexing the seqid table

 drivers/net/zxdh/zxdh_flow.c   |  2 +-
 drivers/net/zxdh/zxdh_msg.c    | 53 ++++++++++++++++++++++++++++------
 drivers/net/zxdh/zxdh_tables.c |  2 +-
 3 files changed, 46 insertions(+), 11 deletions(-)

-- 
2.27.0

[-- Attachment #1.1.2: Type: text/html , Size: 4689 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2026-11-12 23:32 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-07  3:04 [PATCH v1 0/8] net/zxdh: fix some issues reported by OSS scanner Junlong Wang
2026-11-07  3:04 ` [PATCH v1 1/8] net/zxdh: reject out-of-range VLAN ID from VF Junlong Wang
2026-11-07  3:04 ` [PATCH v1 2/8] net/zxdh: initialise DTB entry in flow query Junlong Wang
2026-11-07  3:04 ` [PATCH v1 3/8] net/zxdh: refuse PF mailbox requests not naming a VF of this PF Junlong Wang
2026-11-07  3:04 ` [PATCH v1 4/8] net/zxdh: initialise multicast delete flag Junlong Wang
2026-11-07  3:04 ` [PATCH v1 5/8] net/zxdh: free receive buffer on the async no-ack exit Junlong Wang
2026-11-07  3:04 ` [PATCH v1 6/8] net/zxdh: allocate a zeroed full-size payload buffer Junlong Wang
2026-11-07  3:04 ` [PATCH v1 7/8] net/zxdh: check full 16-bit module id of received messages Junlong Wang
2026-11-07  3:04 ` [PATCH v1 8/8] net/zxdh: check msg id before indexing the seqid table Junlong Wang
2026-11-08 16:58 ` [PATCH v1 0/8] net/zxdh: fix some issues reported by OSS scanner Stephen Hemminger
2026-11-12 10:26 ` [PATCH v2 " Junlong Wang
2026-11-12 10:26   ` [PATCH v2 1/8] net/zxdh: reject out-of-range VLAN ID from VF Junlong Wang
2026-11-12 10:26   ` [PATCH v2 2/8] net/zxdh: initialise DTB entry in flow query Junlong Wang
2026-11-12 10:26   ` [PATCH v2 3/8] net/zxdh: refuse PF mailbox requests not naming a VF of this PF Junlong Wang
2026-11-12 10:26   ` [PATCH v2 4/8] net/zxdh: initialise multicast delete flag Junlong Wang
2026-11-12 10:26   ` [PATCH v2 5/8] net/zxdh: free receive buffer on the async no-ack exit Junlong Wang
2026-11-12 10:26   ` [PATCH v2 6/8] net/zxdh: allocate a zeroed full-size payload buffer Junlong Wang
2026-11-12 10:26   ` [PATCH v2 7/8] net/zxdh: check full 16-bit module id of recv msg Junlong Wang
2026-11-12 10:26   ` [PATCH v2 8/8] net/zxdh: check msg id before indexing the seqid table Junlong Wang
2026-11-12 23:32   ` [PATCH v2 0/8] net/zxdh: fix some issues reported by OSS scanner Stephen Hemminger

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.