Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 344CE386435 for ; Thu, 25 Jun 2026 09:45:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782380752; cv=none; b=cKMaBkPBO3KXEPnaO5jwbkp/iADsHlPl8oAfgGHymc8KH1Xym1Uo+nL+BzXrisrfRR1MWH8suSUoQdwX9DxvCFMntmnpmZgJeyI3wR/eHebkQj6zZ4vWbntWF846Qyju9V18UJAYUxAh8Ru4dMFF/odyq1oz0i8o4oIai2zKQhg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782380752; c=relaxed/simple; bh=lujb0J0xg9O0djsWtdruJbAoZIcdq+gQkiB3kubTcVo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=dnylGXe5emdmXG6JFLcQhwtmMaYVdf0MAGge2yrG2lea9DfsDR03noPseA8gBvpNXLa1wuq1peAHFthjQMxnsb+fMFoBDenvfuZfviIDuALYNmIz0ABiS/vl6+Gvhg01xLFAPZwhH7SeULlaNlTAiTu/G2BTkFtyLI1GxyU1Eoo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Eo4ADMY3; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Eo4ADMY3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 558821F000E9; Thu, 25 Jun 2026 09:45:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1782380750; bh=/P96YwMoHPOs6pjrnpKJ2RyHlQQJB8iJt81GLLo5jn8=; h=From:To:Cc:Subject:Date:Reply-To; b=Eo4ADMY3O+dereIVXpQiOoU2AoQBcZupd6qzSIwyel5X+uYhUfM1Au+T/PmKXwLiP oH8JosAatzkE/6Nei99UHLNKKK8jI+Sm1F3T65T4gNxA0j9p4Tyu3w0VWtAx6f7Ys+ sODy9OvMKd+USj5sGIsSExZ2EuOhBkEQVBJfBBKg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-53230: net/mlx5: Fix slab-out-of-bounds in mlx5_query_nic_vport_mac_list Date: Thu, 25 Jun 2026 09:41:18 +0100 Message-ID: <2026062508-CVE-2026-53230-ddd6@gregkh> X-Mailer: git-send-email 2.54.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=3847; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=G91+0FE6sZGfxZeLmzW4GxS2L7sxv7S/KK+WWU+IHX8=; b=owGbwMvMwCRo6H6F97bub03G02pJDFk2LzOW5Wyd9PT3h7N3a63MJ302NA/6zW167pxbdF73B gWfhVV/OmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiC8wZFixYFxt0envbray8 d9mznM+oFS74HMEwP16z5NiL+cqsZ+rTChy0w5uLGmzWAwA= 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/mlx5: Fix slab-out-of-bounds in mlx5_query_nic_vport_mac_list mlx5_query_nic_vport_mac_list() sizes its firmware command buffer using the PF's log_max_current_uc/mc_list capabilities. When querying a VF vport with a larger configured max (via devlink), the firmware response can overflow this buffer: BUG: KASAN: slab-out-of-bounds in mlx5_query_nic_vport_mac_list+0x453/0x4c0 [mlx5_core] Read of size 4 at addr ff1100013ffc8a12 by task kworker/u96:2/385 CPU: 12 UID: 0 PID: 385 Comm: kworker/u96:2 Not tainted 7.0.0-rc6+ #1 PREEMPT Hardware name: QEMU Standard PC (Q35 + ICH9, 2009) Workqueue: mlx5_esw_wq esw_vport_change_handler [mlx5_core] Call Trace: dump_stack_lvl+0x69/0xa0 print_report+0x176/0x4e4 kasan_report+0xc8/0x100 mlx5_query_nic_vport_mac_list+0x453/0x4c0 [mlx5_core] esw_update_vport_addr_list+0x2e3/0xda0 [mlx5_core] esw_vport_change_handle_locked+0xa1f/0x1060 [mlx5_core] esw_vport_change_handler+0x6a/0x90 [mlx5_core] process_one_work+0x87f/0x15e0 worker_thread+0x62b/0x1020 kthread+0x375/0x490 ret_from_fork+0x4dc/0x810 ret_from_fork_asm+0x11/0x20 Fix by querying the vport's own HCA caps to size the buffer correctly. Refactor the function to allocate and return the MAC list internally, removing the caller's dependency on knowing the correct max. The Linux kernel CVE team has assigned CVE-2026-53230 to this issue. Affected and fixed versions =========================== Issue introduced in 4.5 with commit e16aea2744abea612c27ee0eef606c6a6a8204de and fixed in 6.6.143 with commit 41781f2789309462520a93822e946521ed78f97f Issue introduced in 4.5 with commit e16aea2744abea612c27ee0eef606c6a6a8204de and fixed in 6.12.94 with commit 537d87784e81c3d7037525b99416455cee088cdc Issue introduced in 4.5 with commit e16aea2744abea612c27ee0eef606c6a6a8204de and fixed in 6.18.36 with commit 0f807764bb122fd63aa45f4229cb1ef2679fbd40 Issue introduced in 4.5 with commit e16aea2744abea612c27ee0eef606c6a6a8204de and fixed in 7.0.13 with commit 2398e497389ed4be43f7cfbab499b49cec7dae1a Issue introduced in 4.5 with commit e16aea2744abea612c27ee0eef606c6a6a8204de and fixed in 7.1 with commit 894e036a24a26a6dd7b17d8d3fb5c53ab48a6074 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-53230 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/eswitch.c drivers/net/ethernet/mellanox/mlx5/core/vport.c include/linux/mlx5/vport.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/41781f2789309462520a93822e946521ed78f97f https://git.kernel.org/stable/c/537d87784e81c3d7037525b99416455cee088cdc https://git.kernel.org/stable/c/0f807764bb122fd63aa45f4229cb1ef2679fbd40 https://git.kernel.org/stable/c/2398e497389ed4be43f7cfbab499b49cec7dae1a https://git.kernel.org/stable/c/894e036a24a26a6dd7b17d8d3fb5c53ab48a6074