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 9DC1A1BEF70 for ; Tue, 21 Jan 2025 12:02:02 +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=1737460922; cv=none; b=UIdDOXzLkDl+pyijs+nloTdTDof09Xxjl5YBieFqn3K4ULjskB2FkVA1CNCrPh+B25fNME/mk5QppSNdvK6xeNrubBit0quO0WofVQYU9H7v7i2reJO98lqpRKu1i/DUjdmG/T22TqgHbquW7WAZaCPtUMngV9kJ92PZ3BRtijk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737460922; c=relaxed/simple; bh=mjX61uo/JXVmGLbFWGho86OCZ+jG45FAZktcpWgdDxM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=DdcwxiYBCZq7PsyzAY8tjt9nqBWlz3qYFuPOmCKOUljh4vSmVXJV4BnrtwHFNboXnO6sxBBDnfCPOnHNlvMENWRCTx4yuQVH4KKf3rT8TjIq0EDeOamWaGKCY0Yg82Ot1z4VEXsIDddd7AUG9pKpncCt4Pe/u9BsES0+DctvzmI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Rv1MIQR/; 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="Rv1MIQR/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B0FE8C4CEDF; Tue, 21 Jan 2025 12:02:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1737460922; bh=mjX61uo/JXVmGLbFWGho86OCZ+jG45FAZktcpWgdDxM=; h=From:To:Cc:Subject:Date:Reply-to:From; b=Rv1MIQR/EfinWB/9qDY262SyqH94aMPKdHdvIrCZqgH8Z8jbFE7O13xA4jAL841Hj LDKM5Bp6ZU+iSo4phQ4HGAm/yD7b2qm08m2Sls1eQP+qyQQQbako8lqZ/JJQftnL0q k6yFkZ0r+iNKa9oQ04Uf2XMENvD+r8VNgYTvECk0= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-57932: gve: guard XDP xmit NDO on existence of xdp queues Date: Tue, 21 Jan 2025 13:01:46 +0100 Message-ID: <2025012147-CVE-2024-57932-a9f5@gregkh> X-Mailer: git-send-email 2.48.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=2789; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=mjX61uo/JXVmGLbFWGho86OCZ+jG45FAZktcpWgdDxM=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn9PatZNi+91cKxY5awht9ku4Odq+bKhp9x8b4TF3q8U P6KTkZJRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEzk22KGBRfl/ynvti5kuK7j 2hIT9n62gzRTE8P8jLA/hVskT+xa4tmQm9hvNpVjYjonAA== 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: gve: guard XDP xmit NDO on existence of xdp queues In GVE, dedicated XDP queues only exist when an XDP program is installed and the interface is up. As such, the NDO XDP XMIT callback should return early if either of these conditions are false. In the case of no loaded XDP program, priv->num_xdp_queues=0 which can cause a divide-by-zero error, and in the case of interface down, num_xdp_queues remains untouched to persist XDP queue count for the next interface up, but the TX pointer itself would be NULL. The XDP xmit callback also needs to synchronize with a device transitioning from open to close. This synchronization will happen via the GVE_PRIV_FLAGS_NAPI_ENABLED bit along with a synchronize_net() call, which waits for any RCU critical sections at call-time to complete. The Linux kernel CVE team has assigned CVE-2024-57932 to this issue. Affected and fixed versions =========================== Issue introduced in 6.4 with commit 39a7f4aa3e4a7947614cf1d5c27abba3300adb1e and fixed in 6.6.70 with commit cbe9eb2c39d09f3c8574febcfa39d8c09d0c7cb5 Issue introduced in 6.4 with commit 39a7f4aa3e4a7947614cf1d5c27abba3300adb1e and fixed in 6.12.9 with commit 35f44eed5828cf1bc7e760d1993ed8549ba41c7b Issue introduced in 6.4 with commit 39a7f4aa3e4a7947614cf1d5c27abba3300adb1e and fixed in 6.13 with commit ff7c2dea9dd1a436fc79d6273adffdcc4a7ffea3 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-57932 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/google/gve/gve_main.c drivers/net/ethernet/google/gve/gve_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/cbe9eb2c39d09f3c8574febcfa39d8c09d0c7cb5 https://git.kernel.org/stable/c/35f44eed5828cf1bc7e760d1993ed8549ba41c7b https://git.kernel.org/stable/c/ff7c2dea9dd1a436fc79d6273adffdcc4a7ffea3