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 A68A62E9EAC for ; Tue, 30 Dec 2025 12:16:40 +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=1767097000; cv=none; b=ob/CGO/gfGBOcPaoNt1Twb1wGGeqigYBpC0ldDyqA4+/DYdQxBt2/kqb12QR2AnZ4CGynK4obhrmmZnEKPXaRJLiyqCYtrxJcKfqySCDd8hdWbpVVK/cRsYrCrP6zZ+cInN64FZ9sZCfmKpzltoxcNbUPyPI9un5L97O3VnNP7I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767097000; c=relaxed/simple; bh=DkvWz3+Rs6aBFtLUOxzSWTjtXfpXTr7fpX5bSikcDYM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=NKp+ky+bL5ayrSDnfiYSo4VV6aJIHqu4BS3OZCt/JSqAkcYo0Yif2wbIMqmZKgi+zvXg4v4jnqA+F/zYBTd0qfXGjh1Ebgj8Xr+2dSEydsXY8j5+fJiYnBwUr5DZfXd/jpsYr+q35c9c2HNBuSiYeOipuHkSsSQKE5bkMS/AiLQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=hDp9TfO/; 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="hDp9TfO/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 287D2C4CEFB; Tue, 30 Dec 2025 12:16:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1767097000; bh=DkvWz3+Rs6aBFtLUOxzSWTjtXfpXTr7fpX5bSikcDYM=; h=From:To:Cc:Subject:Date:Reply-To:From; b=hDp9TfO/wfWEmmT1hsUGBTc8jsrVIp+2kb4Ldn5X12iJLV0l/1ogPC0LgKzd17PYa e7l+gcMU9LGaARm4qc+3sbP6J3TzDHDXye0AUYRZlxikAnaxY9dOZ9F23X731ma23U quzGELZYwB9MjU6h1MYUUA002/OHWpGihQEhYl98= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-54238: mlx5: fix skb leak while fifo resync and push Date: Tue, 30 Dec 2025 13:14:08 +0100 Message-ID: <2025123033-CVE-2023-54238-87c9@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=2682; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=lxJprDQixs1hsOChgpNE5c4j+WiJ7KvUZFTf+LVPMOM=; b=owGbwMvMwCRo6H6F97bub03G02pJDJnBB98Gz2aWqkuIrmoSC1iisJsz+dEk/ht6cpPTE7fob fN59elERywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEzkXCLDgsOvM+0U0w56Ony6 Kpkn7X7tUgPDMYYFW6v9REU7blwSXOngvdhd9Lq+5srrAA== 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: mlx5: fix skb leak while fifo resync and push During ptp resync operation SKBs were poped from the fifo but were never freed neither by napi_consume nor by dev_kfree_skb_any. Add call to napi_consume_skb to properly free SKBs. Another leak was happening because mlx5e_skb_fifo_has_room() had an error in the check. Comparing free running counters works well unless C promotes the types to something wider than the counter. In this case counters are u16 but the result of the substraction is promouted to int and it causes wrong result (negative value) of the check when producer have already overlapped but consumer haven't yet. Explicit cast to u16 fixes the issue. The Linux kernel CVE team has assigned CVE-2023-54238 to this issue. Affected and fixed versions =========================== Issue introduced in 6.0 with commit 58a518948f60153e8f6cb8361d2712aa3a1af94a and fixed in 6.1.18 with commit 234cffda95e1049f58e8ec136ef105c633f0ed19 Issue introduced in 6.0 with commit 58a518948f60153e8f6cb8361d2712aa3a1af94a and fixed in 6.2.5 with commit 68504c66d08c70fb92799722e25a932d311d74fd Issue introduced in 6.0 with commit 58a518948f60153e8f6cb8361d2712aa3a1af94a and fixed in 6.3 with commit e435941b1da1a0be4ff8a7ae425774c76a5ac514 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-2023-54238 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/ptp.c drivers/net/ethernet/mellanox/mlx5/core/en/txrx.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/234cffda95e1049f58e8ec136ef105c633f0ed19 https://git.kernel.org/stable/c/68504c66d08c70fb92799722e25a932d311d74fd https://git.kernel.org/stable/c/e435941b1da1a0be4ff8a7ae425774c76a5ac514