From mboxrd@z Thu Jan 1 00:00:00 1970 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 3298880C19 for ; Fri, 23 Feb 2024 14:48:12 +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=1708699693; cv=none; b=jujHQ7Rlz1eql04YdVTWEQ2LmKt7UpkRAgrdY4fJgLqQHyaV5+BKT9SieKhYA8xa7pAJN3PB5YoIMig+XYO9QbI1C7dhWmOvCI0mWBo3IWC5I7naDu/96VPP+7ggqCv2Q8ttG6wLmV4m3xadPsOYoaWuNyCgaDE+OZiRmD93Oj4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708699693; c=relaxed/simple; bh=eT+t/MPrsyfWKFoETQYGuq8Tt4oHyFZKKiUp5cdD5OI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=d1iIDdL5fd2/Uf3HPMrOCNqtucjTO5+yIZe+6W6hwYaAeOPx0lPugxs8Xc57r/rd4wz/ppWlvvoIHBC3aE3+Iyhm1XyZYTsxmNmMBSiZccqw8kuxeIrAukA9X4spijLCr8iSQgc8XeT7q+vFd1WcHd2bC0lpi3jWJt4/FXXi3OQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=U8gxzCTS; 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="U8gxzCTS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6E8F1C43399; Fri, 23 Feb 2024 14:48:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1708699692; bh=eT+t/MPrsyfWKFoETQYGuq8Tt4oHyFZKKiUp5cdD5OI=; h=From:To:Cc:Subject:Date:Reply-to:From; b=U8gxzCTSpv95KO6FfVDm/tGaE3EcOE8mBpuICMcv2kzf7ap6nF96gO/2i8s4FujmS gQTkw0vuWPsVEngFmNXon4U3lMYVjKpNq1lfI0RmpVubPdG6fYl6ApMD3Eu2+2YQPX ecLgxsSQM6T4QHsdgZ0S6cineFhYuPgbjBbjw03w= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-26595: mlxsw: spectrum_acl_tcam: Fix NULL pointer dereference in error path Date: Fri, 23 Feb 2024 15:47:37 +0100 Message-ID: <2024022336-CVE-2024-26595-9a8d@gregkh> X-Mailer: git-send-email 2.43.2 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2825; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=eT+t/MPrsyfWKFoETQYGuq8Tt4oHyFZKKiUp5cdD5OI=; b=owGbwMvMwCRo6H6F97bub03G02pJDKk3NnBMMDr7z+tpr8WGzGkaR64yPniUq+Ppy/xowmSmj 4ecvDuOdsSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEHh5imO+8VPQMj0Df8/6K 92JPHGXvK8+vM2eYp/bo8i71KrGu1D6WOzfa9kxm7VvEBAA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: mlxsw: spectrum_acl_tcam: Fix NULL pointer dereference in error path When calling mlxsw_sp_acl_tcam_region_destroy() from an error path after failing to attach the region to an ACL group, we hit a NULL pointer dereference upon 'region->group->tcam' [1]. Fix by retrieving the 'tcam' pointer using mlxsw_sp_acl_to_tcam(). [1] BUG: kernel NULL pointer dereference, address: 0000000000000000 [...] RIP: 0010:mlxsw_sp_acl_tcam_region_destroy+0xa0/0xd0 [...] Call Trace: mlxsw_sp_acl_tcam_vchunk_get+0x88b/0xa20 mlxsw_sp_acl_tcam_ventry_add+0x25/0xe0 mlxsw_sp_acl_rule_add+0x47/0x240 mlxsw_sp_flower_replace+0x1a9/0x1d0 tc_setup_cb_add+0xdc/0x1c0 fl_hw_replace_filter+0x146/0x1f0 fl_change+0xc17/0x1360 tc_new_tfilter+0x472/0xb90 rtnetlink_rcv_msg+0x313/0x3b0 netlink_rcv_skb+0x58/0x100 netlink_unicast+0x244/0x390 netlink_sendmsg+0x1e4/0x440 ____sys_sendmsg+0x164/0x260 ___sys_sendmsg+0x9a/0xe0 __sys_sendmsg+0x7a/0xc0 do_syscall_64+0x40/0xe0 entry_SYSCALL_64_after_hwframe+0x63/0x6b The Linux kernel CVE team has assigned CVE-2024-26595 to this issue. Affected and fixed versions =========================== Issue introduced in 4.11 with commit 22a677661f56 and fixed in 6.6.14 with commit 817840d125a3 Issue introduced in 4.11 with commit 22a677661f56 and fixed in 6.7.2 with commit d0a1efe417c9 Issue introduced in 4.11 with commit 22a677661f56 and fixed in 6.8-rc1 with commit efeb7dfea8ee Please see https://www.kernel.org or 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-2024-26595 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/mlxsw/spectrum_acl_tcam.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/817840d125a370626895df269c50c923b79b0a39 https://git.kernel.org/stable/c/d0a1efe417c97a1e9b914056ee6b86f1ef75fe1f https://git.kernel.org/stable/c/efeb7dfea8ee10cdec11b6b6ba4e405edbe75809