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 D70DC241685 for ; Wed, 15 Jan 2025 13:10:57 +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=1736946657; cv=none; b=B1El6Vbb67GbXU4txoOwv9vuWnWyXwQm4NtoxRW2OROrmIDxbW7aieZPrjf1M/weVsq7R/bjtRWwFxkp0ZnRQrtBVZuAHTJfwMzk+BR00PeyyYrJYWFrsKUg16TJ+clF3TlmQ4TK2r83EnIbFvb8bo9XFfKox7GA9W28t4CedJg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736946657; c=relaxed/simple; bh=9REUEUpZk9yK8SmvwMs0Ul2p3Owifni2TurtXOzSk0o=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=SxotFtIyp9DZogjZwJO2LxDMc1fl6f7BRhu4m4IJQkEsjEzeppOgnY+oCLDP7JH4GBmHZOVvB+u+WId0emJSu4Uh/92gLGdVInJQxWweJrZW8Uy76NmbbJtdHyjJxWf0RVGg4z5uqoJsTPrOTKwIkbRs7Iq2uQFlTrxeoNA78jA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Jv+CXjS9; 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="Jv+CXjS9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3D320C4CEDF; Wed, 15 Jan 2025 13:10:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1736946657; bh=9REUEUpZk9yK8SmvwMs0Ul2p3Owifni2TurtXOzSk0o=; h=From:To:Cc:Subject:Date:Reply-to:From; b=Jv+CXjS9GFTEySx0DpeqXCZnRqnerMAn5Re8RSpOsLxoW/8NWZcb0CNQogHUuszgX cZOq7H353ZB+yfcWsWosUpWdl2qIDZhUz6OSK79BkHmuIahR/4nRlJgWDXQlNZXVqD iuQfO3TlWxE87c4YSipJmSyfw2ib4zSgRiAYWF0A= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-57801: net/mlx5e: Skip restore TC rules for vport rep without loaded flag Date: Wed, 15 Jan 2025 14:10:37 +0100 Message-ID: <2025011533-CVE-2024-57801-6479@gregkh> X-Mailer: git-send-email 2.48.0 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=2441; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=9REUEUpZk9yK8SmvwMs0Ul2p3Owifni2TurtXOzSk0o=; b=owGbwMvMwCRo6H6F97bub03G02pJDOntm09O03pUskuLfXpi8h4vT8OX7LM10u5MUf5nsZpJZ YlAWPi0jlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZjIyzMMC7ZfSUpNO7iT5U7i g7sPO699cBcuj2FY0PBgxrzkQ1zKHA+bVJ9w/J2+fO+UYAA= 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: net/mlx5e: Skip restore TC rules for vport rep without loaded flag During driver unload, unregister_netdev is called after unloading vport rep. So, the mlx5e_rep_priv is already freed while trying to get rpriv->netdev, or walk rpriv->tc_ht, which results in use-after-free. So add the checking to make sure access the data of vport rep which is still loaded. The Linux kernel CVE team has assigned CVE-2024-57801 to this issue. Affected and fixed versions =========================== Issue introduced in 6.6 with commit d1569537a837d66620aa7ffc2bddf918e902f227 and fixed in 6.6.70 with commit 3e45dd1622a2c1a83c11bf42fdd8c1810123d6c0 Issue introduced in 6.6 with commit d1569537a837d66620aa7ffc2bddf918e902f227 and fixed in 6.12.9 with commit 47c78d3fc26e38ab805613a0f592dc8a820c7c64 Issue introduced in 6.6 with commit d1569537a837d66620aa7ffc2bddf918e902f227 and fixed in 6.13-rc6 with commit 5a03b368562a7ff5f5f1f63b5adf8309cbdbd5be 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-2024-57801 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/esw/ipsec_fs.c drivers/net/ethernet/mellanox/mlx5/core/eswitch.h drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.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/3e45dd1622a2c1a83c11bf42fdd8c1810123d6c0 https://git.kernel.org/stable/c/47c78d3fc26e38ab805613a0f592dc8a820c7c64 https://git.kernel.org/stable/c/5a03b368562a7ff5f5f1f63b5adf8309cbdbd5be