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 D768E328B47 for ; Sat, 31 Jan 2026 11:44:52 +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=1769859892; cv=none; b=MXqLJWHLhYzsnA3QHmLzW1tLu50f1ZDFBb4T2wtyHLK+juWQukQ7WqMB73BEmNYkrEcKndGfw0IA82+wKmogZ7D/pUzBim8wYw2HPmk0fbo28CTI4bu/O9ctOS70PvVTi5ryaW+gt2zF/gnQ4tfNCH8ITTxTJWDqMcXGeNv3klg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769859892; c=relaxed/simple; bh=ZPsGk5HURZ0yWhr3/bx70zGsKpXzP7erVlIsII57eMY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=QCGSzE7IMcnshTL+5YWZnC6C8QqAhWAFVbQ6RFmNJZ8CY2O5XIvQtduOAfbUgqGFW4HuqkVwtiFqOxCZvfmkDTJeQG2pnOXr19NQrvJ4eDuPc90uPuin22neG9Sb7QH+JlnxnB32SADVy8L44HSIRN+D1QjzOC4ViC26NDF+pD0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=S42qo7um; 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="S42qo7um" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 69312C4CEF1; Sat, 31 Jan 2026 11:44:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1769859892; bh=ZPsGk5HURZ0yWhr3/bx70zGsKpXzP7erVlIsII57eMY=; h=From:To:Cc:Subject:Date:Reply-To:From; b=S42qo7umSVpcDfz0zxXqmAwdJfSHvuqaYK7/SroIOcRQEdbwdSmanglFWGLYnwZIw x5W7FVW0Xlm6nCo49LwWOh+Q8GdkVr48Oduw9WnTXPnilCT+TLiq/tRQS1iA6vZwBm +7IhBL4l9qySldGh7a1FstZpChQJUuBlADxz4Ep8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-23035: net/mlx5e: Pass netdev to mlx5e_destroy_netdev instead of priv Date: Sat, 31 Jan 2026 12:44:35 +0100 Message-ID: <2026013121-CVE-2026-23035-0b86@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=4545; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=2rs+DHWA+dgM2RF5D2PmEalW8Nc3x724CzmszAbl1dE=; b=owGbwMvMwCRo6H6F97bub03G02pJDJm1r0X9/855e/zsyrkcvy6rcWVO1hHqnFP76P9rZUXL+ bxNqtP3d8SyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEkv8xLNgy7erJf+FpTZqq m89EFB+V/3s+34NhnvZd99sWho3R7B8jex7M73C6rlqwEQA= 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: Pass netdev to mlx5e_destroy_netdev instead of priv mlx5e_priv is an unstable structure that can be memset(0) if profile attaching fails. Pass netdev to mlx5e_destroy_netdev() to guarantee it will work on a valid netdev. On mlx5e_remove: Check validity of priv->profile, before attempting to cleanup any resources that might be not there. 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: 0000000000000370 PGD 0 P4D 0 Oops: Oops: 0000 [#1] SMP NOPTI CPU: 15 UID: 0 PID: 520 Comm: devlink Not tainted 6.18.0-rc5+ #115 PREEMPT(voluntary) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-2.fc40 04/01/2014 RIP: 0010:mlx5e_dcbnl_dscp_app+0x23/0x100 RSP: 0018:ffffc9000083f8b8 EFLAGS: 00010286 RAX: ffff8881126fc380 RBX: ffff8881015ac400 RCX: ffffffff826ffc45 RDX: 0000000000000000 RSI: 0000000000000001 RDI: ffff8881035109c0 RBP: ffff8881035109c0 R08: ffff888101e3e838 R09: ffff888100264e10 R10: ffffc9000083f898 R11: ffffc9000083f8a0 R12: ffff888101b921a0 R13: ffff888101b921a0 R14: ffff8881015ac9a0 R15: ffff8881015ac400 FS: 00007f789a3c8740(0000) GS:ffff88856aa59000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000370 CR3: 000000010b6c0001 CR4: 0000000000370ef0 Call Trace: mlx5e_remove+0x57/0x110 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-23035 to this issue. Affected and fixed versions =========================== Issue introduced in 5.12 with commit c4d7eb57687f358cd498ea3624519236af8db97e and fixed in 6.12.67 with commit a7625bacaa8c8c2bfcde6dd6d1397bd63ad82b02 Issue introduced in 5.12 with commit c4d7eb57687f358cd498ea3624519236af8db97e and fixed in 6.18.7 with commit 66a25f6b7c0bfd84e6d27b536f5d24116dbd52da Issue introduced in 5.12 with commit c4d7eb57687f358cd498ea3624519236af8db97e and fixed in 6.19-rc6 with commit 4ef8512e1427111f7ba92b4a847d181ff0aeec42 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-23035 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 drivers/net/ethernet/mellanox/mlx5/core/en_rep.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/a7625bacaa8c8c2bfcde6dd6d1397bd63ad82b02 https://git.kernel.org/stable/c/66a25f6b7c0bfd84e6d27b536f5d24116dbd52da https://git.kernel.org/stable/c/4ef8512e1427111f7ba92b4a847d181ff0aeec42