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 3C30D1F8939 for ; Wed, 4 Dec 2024 14:21: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=1733322073; cv=none; b=Jdk5oYUhZFCxkx+Vb5T60z92fri2PALIlNfsZp2rHaWdd1aoVDG67UKbLD8IxmqUxos7T2rUfectWUahNQHoXfFRYZCYU5tHmqGI0y7cI8ftPsY4kv5KP+luLQTJKZbsagB+GI9oebmqycLv7b11kWmSOXrMMH9//XUxkyNqMCM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733322073; c=relaxed/simple; bh=qyLutMcnKMCFxRW/gi0n+gmLBQBHaAmlDVoxcRzGsV4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=r4F3kr6jjq4E+qvKbiv4VNT6p2KQT/qkkcD98haLwMDWxw5bZhyBFlF306iy3lO0nPt6rH6qh1vnscpGR+ZnpOd3ApeUNIuFGHQ5niHwzEe8uBsBktdeKb7X0t703cS+UOJwwOWL9JWAyfAKeh6vS8RGbU0jdhu3ARlzy+ymdOs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=QiBkEq0r; 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="QiBkEq0r" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 56194C4CECD; Wed, 4 Dec 2024 14:21:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1733322072; bh=qyLutMcnKMCFxRW/gi0n+gmLBQBHaAmlDVoxcRzGsV4=; h=From:To:Cc:Subject:Date:Reply-to:From; b=QiBkEq0rwheXr44W3eN3Ab0k0+KB5uRb1ipGQeLVb7QqoyXpKCDwFPH2GBxBHSzDw B/UGthd6WtvOR5cQMuYjXmra9mwlStULnwyT/NFVs8qiB1vkRx8yHK/qM6iqN2CQUh A5waX33OWNGKJlcMS/zOGiTst7V3fSOgOeku0tcM= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-53138: net/mlx5e: kTLS, Fix incorrect page refcounting Date: Wed, 4 Dec 2024 15:21:01 +0100 Message-ID: <2024120452-CVE-2024-53138-1849@gregkh> X-Mailer: git-send-email 2.47.1 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=2684; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=qyLutMcnKMCFxRW/gi0n+gmLBQBHaAmlDVoxcRzGsV4=; b=owGbwMvMwCRo6H6F97bub03G02pJDOkBqS5P/DbWsKu5SH8TXM3+k+2DvXLlN5vax1oOGh4rK 3PnPVzQEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABMJf8qwYPU2yx1BRhfsVkSJ vStaMttppkKAHcP8utSVLdmShqlr7lyuFH2e3hQ1YaIaAA== 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: kTLS, Fix incorrect page refcounting The kTLS tx handling code is using a mix of get_page() and page_ref_inc() APIs to increment the page reference. But on the release path (mlx5e_ktls_tx_handle_resync_dump_comp()), only put_page() is used. This is an issue when using pages from large folios: the get_page() references are stored on the folio page while the page_ref_inc() references are stored directly in the given page. On release the folio page will be dereferenced too many times. This was found while doing kTLS testing with sendfile() + ZC when the served file was read from NFS on a kernel with NFS large folios support (commit 49b29a573da8 ("nfs: add support for large folios")). The Linux kernel CVE team has assigned CVE-2024-53138 to this issue. Affected and fixed versions =========================== Issue introduced in 5.4 with commit 84d1bb2b139e and fixed in 6.1.119 with commit 69fbd07f17b0 Issue introduced in 5.4 with commit 84d1bb2b139e and fixed in 6.6.63 with commit 93a14620b97c Issue introduced in 5.4 with commit 84d1bb2b139e and fixed in 6.11.10 with commit 2723e8b2cbd4 Issue introduced in 5.4 with commit 84d1bb2b139e and fixed in 6.12 with commit dd6e972cc589 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-53138 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_accel/ktls_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/69fbd07f17b0fdaf8970bc705f5bf115c297839d https://git.kernel.org/stable/c/93a14620b97c911489a5b008782f3d9b0c4aeff4 https://git.kernel.org/stable/c/2723e8b2cbd486cb96e5a61b22473f7fd62e18df https://git.kernel.org/stable/c/dd6e972cc5890d91d6749bb48e3912721c4e4b25