Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 432B0237A4F for ; Sun, 25 Jan 2026 14:37:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769351846; cv=none; b=dSWQ7ttj0NbfsPa3oHiUr6mnIY/vmI1UOl0NB1bdq0f/NfNK0z+fEjdQgIqebz4L1XES3cHwNgfocS7vZ3W/mPARGPnCq0DLxnigg8hCmDHq16eEMUNPxpL/zO8ZmBptCsgo6AN0fLeuQFAXUoZ07juvIf4l3rMSaoP60dI6E/s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769351846; c=relaxed/simple; bh=UH25u4qGQsPxnz0i4ejJwleDQoiYqbXar1AI3N7cZVo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=A9hudF3boevwHHa75/RLNkUniWmMjvIWfwODiexDWt5K5iLdui2SUG3q3ljPrmUitJQRyJbWHn4knynk/2RlkZ6huKa4vpcIbWaXQiE/Hn4HkjwbKuLoDS/LMP3XTVP4ZFjlibVGMGrAeemCHK73j7VukVqmmaGXmuRkMqWBxwI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Mfw41JKo; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Mfw41JKo" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A723DC4CEF1; Sun, 25 Jan 2026 14:37:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1769351846; bh=UH25u4qGQsPxnz0i4ejJwleDQoiYqbXar1AI3N7cZVo=; h=From:To:Cc:Subject:Date:Reply-To:From; b=Mfw41JKoaw958rHZWsJfBPdGNQYpDEEeNJSh/465rMfFRw58jIANpyZaq57nrcWWh sUebMdB3irK/5IBBEn4TGGqJgoEI1AcNuQyKz+r3upwSGxIjq/P417YsRTnUSi7uKB 22QNU6oPc8OYGr+xJfz9Cy5fmRTiovq9F57Jg64c= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-22996: net/mlx5e: Don't store mlx5e_priv in mlx5e_dev devlink priv Date: Sun, 25 Jan 2026 15:36:32 +0100 Message-ID: <2026012532-CVE-2026-22996-f977@gregkh> X-Mailer: git-send-email 2.52.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4561; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=2MafdCEWKPOlpTKw+dB+r+JOYtMNJ0eQrcZJCJuoFkw=; b=owGbwMvMwCRo6H6F97bub03G02pJDJllWgWvHErtDsawuUnNrW2+JOv1sWZ2wxSX8zzLj12Ql TdMPcrUEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABPx3c8wv/LPLbFXzp9ev9wf OaOvY02b74cD8xnmqW1NLUwK/HxZ8ldn2eoQTc1jiW61AA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: net/mlx5e: Don't store mlx5e_priv in mlx5e_dev devlink priv mlx5e_priv is an unstable structure that can be memset(0) if profile attaching fails, mlx5e_priv in mlx5e_dev devlink private is used to reference the netdev and mdev associated with that struct. Instead, store netdev directly into mlx5e_dev and get mdev from the containing mlx5_adev aux device structure. This fixes a kernel oops in mlx5e_remove when switchdev mode fails due to change profile failure. $ devlink dev eswitch set pci/0000:00:03.0 mode switchdev Error: mlx5_core: Failed setting eswitch to offloads. dmesg: workqueue: Failed to create a rescuer kthread for wq "mlx5e": -EINTR mlx5_core 0012:03:00.1: mlx5e_netdev_init_profile:6214:(pid 37199): mlx5e_priv_init failed, err=-12 mlx5_core 0012:03:00.1 gpu3rdma1: mlx5e_netdev_change_profile: new profile init failed, -12 workqueue: Failed to create a rescuer kthread for wq "mlx5e": -EINTR mlx5_core 0012:03:00.1: mlx5e_netdev_init_profile:6214:(pid 37199): mlx5e_priv_init failed, err=-12 mlx5_core 0012:03:00.1 gpu3rdma1: mlx5e_netdev_change_profile: failed to rollback to orig profile, -12 $ devlink dev reload pci/0000:00:03.0 ==> oops BUG: kernel NULL pointer dereference, address: 0000000000000520 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 0 P4D 0 Oops: Oops: 0000 [#1] SMP NOPTI CPU: 3 UID: 0 PID: 521 Comm: devlink Not tainted 6.18.0-rc5+ #117 PREEMPT(voluntary) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-2.fc40 04/01/2014 RIP: 0010:mlx5e_remove+0x68/0x130 RSP: 0018:ffffc900034838f0 EFLAGS: 00010246 RAX: ffff88810283c380 RBX: ffff888101874400 RCX: ffffffff826ffc45 RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000 RBP: ffff888102d789c0 R08: ffff8881007137f0 R09: ffff888100264e10 R10: ffffc90003483898 R11: ffffc900034838a0 R12: ffff888100d261a0 R13: ffff888100d261a0 R14: ffff8881018749a0 R15: ffff888101874400 FS: 00007f8565fea740(0000) GS:ffff88856a759000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000520 CR3: 000000010b11a004 CR4: 0000000000370ef0 Call Trace: device_release_driver_internal+0x19c/0x200 bus_remove_device+0xc6/0x130 device_del+0x160/0x3d0 ? devl_param_driverinit_value_get+0x2d/0x90 mlx5_detach_device+0x89/0xe0 mlx5_unload_one_devl_locked+0x3a/0x70 mlx5_devlink_reload_down+0xc8/0x220 devlink_reload+0x7d/0x260 devlink_nl_reload_doit+0x45b/0x5a0 genl_family_rcv_msg_doit+0xe8/0x140 The Linux kernel CVE team has assigned CVE-2026-22996 to this issue. Affected and fixed versions =========================== Issue introduced in 5.12 with commit c4d7eb57687f358cd498ea3624519236af8db97e and fixed in 6.12.67 with commit dcb2ad755a16cb0ecd2dc98234d71a6e216ae7fe Issue introduced in 5.12 with commit c4d7eb57687f358cd498ea3624519236af8db97e and fixed in 6.18.7 with commit a3d4f87d41f5140f1cf5c02fce5cdad2637f6244 Issue introduced in 5.12 with commit c4d7eb57687f358cd498ea3624519236af8db97e and fixed in 6.19-rc6 with commit 123eda2e5b1638e298e3a66bb1e64a8da92de5e1 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-22996 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.h drivers/net/ethernet/mellanox/mlx5/core/en_main.c 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/dcb2ad755a16cb0ecd2dc98234d71a6e216ae7fe https://git.kernel.org/stable/c/a3d4f87d41f5140f1cf5c02fce5cdad2637f6244 https://git.kernel.org/stable/c/123eda2e5b1638e298e3a66bb1e64a8da92de5e1