Skip to contentSkip to conversation

CVE-2026-97962: net/mlx5e: Move representor vnic reporter to eswitch devlink port

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 25

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

net/mlx5e: Move representor vnic reporter to eswitch devlink port

The representor vnic devlink health reporter is created and destroyed along the representor netdev (un)load path, which is not serialized by the devlink instance lock. Destroying the reporter from there triggers a devl_assert_locked() splat on driver unbind:

  WARNING: net/devlink/core.c:259 at devl_assert_locked+0x54/0x70, CPU#2: bash/3758
  Modules linked in: mlx5_vdpa vringh vdpa mlx5_ib mlx5_fwctl mlx5_core ...
  CPU: 2 UID: 0 PID: 3758 Comm: bash Tainted: G        W           6.19.0+ #1 PREEMPT
  Tainted: [W]=WARN
  Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), ...
  RIP: 0010:devl_assert_locked+0x54/0x70
  Call Trace:
   <TASK>
   devl_health_reporter_destroy+0x3a/0x1b0
   mlx5e_vport_rep_unload+0x12d/0x2b0 [mlx5_core]
   mlx5_eswitch_unregister_vport_reps+0x1b8/0x220 [mlx5_core]
   ? __esw_offloads_unload_rep+0x190/0x190 [mlx5_core]
   ? kernfs_remove_by_name_ns+0xc3/0xf0
   device_release_driver_internal+0x3b2/0x560
   unbind_store+0xce/0xf0

Move the reporter's lifecycle to the eswitch devlink port (un)register paths, which are already serialized by the devlink instance lock, and store the handle on mlx5_devlink_port. Use the port's mlx5_vport as the reporter priv since the diagnose callback only needs a device handle and a vport number, and mlx5_vport carries both and is initialized before any representor driver probes.

The Linux kernel CVE team has assigned CVE-2026-97962 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 6.4 with commit cf14af140a5ad0937d385ce693100f33f02e9c54 and fixed in 6.18.53 with commit dcaba72c85c14fe7393a59d61695941e6ccbd7d7
	Issue introduced in 6.4 with commit cf14af140a5ad0937d385ce693100f33f02e9c54 and fixed in 7.2.7 with commit d1fcff9b39bac188ef62a77ebd176484be928ec2
	Issue introduced in 6.4 with commit cf14af140a5ad0937d385ce693100f33f02e9c54 and fixed in 7.3-rc3 with commit 7f26a5e8040b4957ef4dbdfcde6cc7ba2db53937

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-97962

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c drivers/net/ethernet/mellanox/mlx5/core/en_rep.h drivers/net/ethernet/mellanox/mlx5/core/esw/devlink_port.c drivers/net/ethernet/mellanox/mlx5/core/eswitch.h

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/dcaba72c85c14fe7393a59d61695941e6ccbd7d7
	https://git.kernel.org/stable/c/d1fcff9b39bac188ef62a77ebd176484be928ec2
	https://git.kernel.org/stable/c/7f26a5e8040b4957ef4dbdfcde6cc7ba2db53937