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 3E9CF13A885 for ; Wed, 17 Apr 2024 10:17:51 +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=1713349072; cv=none; b=NYl5lxhHZNrUSSCKHexcuVz3d3SoX97YYE7TFa2B08EIZdcHeN+CB2OfRxTgQ6mzatL1krcnVxg1UOTv0VldO1mJhJszY3t6dUUs/qJMSDYx/nCVBSqc4ztyyJN2smRlYhTd0TitdaO50pdkDe3Kvvu0u2x5KHxme86uSedb1co= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713349072; c=relaxed/simple; bh=n0gR0X/qbsiGf6Xztgse61PhPir2vCwyalS6Kh3U+jw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=N8f40yWhquLgGkiahY/4EOEjpjsHWUJww9Cr8QKmBbAlXwp+xF0WXGCuuq4PPV3gJNkWvaAPDzjy6GgSSn4Dp7vlry3w5k4aE31FE1Br0YtubFdaPjgPuneJdnu91eH5J9KsevaKqYjOiR9qy/j2dDfYWFhkwTJosNsiAJcKkIk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=pmAl8GJ6; 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="pmAl8GJ6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 68B62C072AA; Wed, 17 Apr 2024 10:17:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1713349071; bh=n0gR0X/qbsiGf6Xztgse61PhPir2vCwyalS6Kh3U+jw=; h=From:To:Cc:Subject:Date:Reply-to:From; b=pmAl8GJ68JrbIa8hWRg0DdYwln4o+TdjaMth/4//OyVruJGnv1ko9fsLO0NY1ubrw fCfaIg1NmMMs2v0gtVuebI70C1FKgjf4D++kgtZOV2Ej5UwGReXtERyFyid6hg21p3 9eDpckX258YMfpXsJeYpeYgv4shKoin6XFxefAxA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-26858: net/mlx5e: Use a memory barrier to enforce PTP WQ xmit submission tracking occurs after populating the metadata_map Date: Wed, 17 Apr 2024 12:17:31 +0200 Message-ID: <2024041725-CVE-2024-26858-34fb@gregkh> X-Mailer: git-send-email 2.44.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=2534; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=n0gR0X/qbsiGf6Xztgse61PhPir2vCwyalS6Kh3U+jw=; b=owGbwMvMwCRo6H6F97bub03G02pJDGnyC7euPsFk5v3ts6urg/w/twn/NcpT1O/fcnj3YEcQp 9rbTVvnd8SyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBETO8xzGI6HHrduPv9ku0M TrLtmZpiy1ql9jMs2Dkz2FU6JPlc5KzH7oG5v2UX+NctAQA= 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: Use a memory barrier to enforce PTP WQ xmit submission tracking occurs after populating the metadata_map Just simply reordering the functions mlx5e_ptp_metadata_map_put and mlx5e_ptpsq_track_metadata in the mlx5e_txwqe_complete context is not good enough since both the compiler and CPU are free to reorder these two functions. If reordering does occur, the issue that was supposedly fixed by 7e3f3ba97e6c ("net/mlx5e: Track xmit submission to PTP WQ after populating metadata map") will be seen. This will lead to NULL pointer dereferences in mlx5e_ptpsq_mark_ts_cqes_undelivered in the NAPI polling context due to the tracking list being populated before the metadata map. The Linux kernel CVE team has assigned CVE-2024-26858 to this issue. Affected and fixed versions =========================== Issue introduced in 6.6.3 with commit 4d510506b465 and fixed in 6.6.22 with commit d1f71615dbb3 Issue introduced in 6.7 with commit 7e3f3ba97e6c and fixed in 6.7.10 with commit 936ef086161a Issue introduced in 6.7 with commit 7e3f3ba97e6c and fixed in 6.8 with commit b7cf07586c40 Issue introduced in 6.5.13 with commit a9d6c0c5a6bd 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-26858 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_tx.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/d1f71615dbb305f14f3b756cce015d70d8667549 https://git.kernel.org/stable/c/936ef086161ab89a7f38f7a0761d6a3063c3277e https://git.kernel.org/stable/c/b7cf07586c40f926063d4d09f7de28ff82f62b2a