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 9669B23759 for ; Mon, 20 May 2024 09:43:54 +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=1716198234; cv=none; b=kNffI53unhBfPNR64E+RPr1JGvAgxv6iuF1X18KahFSJQKo+vx5q/o8JroEbk3ci9WjsyhkfiD8aLmqXPi/3GqIYv9AxhzfzrWSPF7jmruiwdtjdUavuurYFX8mIDAiUBQ79coP7nEL2ycjVvyoUUphbBLznZohQD1TIso85oP8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716198234; c=relaxed/simple; bh=npKbEAcCa5zif5pRMRsIm4hEO8xiqvCFAB0Xh65I5k0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=aBA7ds9+O7M9EAEcF4QupV12Pmpu8mxDZ5/7op3V+VwAp3mroc4cer42eqd73pVpJfjoHyLtdTWmCvC3Qsoef1xqPmCzIpIm5DRmllOVpHX1JI3Xa+FEbrK1fc0ZnHiTzCeGsYY6vPYtjeqtYqygMFOQAsdclnFAk35dHiLxwhM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ig9EKAGw; 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="ig9EKAGw" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1E87EC2BD10; Mon, 20 May 2024 09:43:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716198234; bh=npKbEAcCa5zif5pRMRsIm4hEO8xiqvCFAB0Xh65I5k0=; h=From:To:Cc:Subject:Date:Reply-to:From; b=ig9EKAGw915FjFbFA2e1L46tOk8XL1sZ+/yipZEjAQqkEi9KAifIOUAawdUue134w hcBc0+Kn9TykWGjzTq0G4UNKkSaGfl0jcKC6WrIOlZ6ONETvalp0aEprO36gP1A16n j95OGkg0r7njBCcOOek5QeJJ6cRrTCiAuuvvHBrc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-35958: net: ena: Fix incorrect descriptor free behavior Date: Mon, 20 May 2024 11:42:23 +0200 Message-ID: <2024052019-CVE-2024-35958-18a7@gregkh> X-Mailer: git-send-email 2.45.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=3051; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=npKbEAcCa5zif5pRMRsIm4hEO8xiqvCFAB0Xh65I5k0=; b=owGbwMvMwCRo6H6F97bub03G02pJDGneUr+nfLm6vNhmsVyehsqGB/Fi13Y+4ZKIZHL+weKg/ TymauHKjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZjI95kM88xmb5/yiHVa4V7r OX8m7rPSfXr+awLDgmUh3Pd8nRL8tfjKJd05pu3nztB+AAA= 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: ena: Fix incorrect descriptor free behavior ENA has two types of TX queues: - queues which only process TX packets arriving from the network stack - queues which only process TX packets forwarded to it by XDP_REDIRECT or XDP_TX instructions The ena_free_tx_bufs() cycles through all descriptors in a TX queue and unmaps + frees every descriptor that hasn't been acknowledged yet by the device (uncompleted TX transactions). The function assumes that the processed TX queue is necessarily from the first category listed above and ends up using napi_consume_skb() for descriptors belonging to an XDP specific queue. This patch solves a bug in which, in case of a VF reset, the descriptors aren't freed correctly, leading to crashes. The Linux kernel CVE team has assigned CVE-2024-35958 to this issue. Affected and fixed versions =========================== Issue introduced in 5.6 with commit 548c4940b9f1 and fixed in 5.10.216 with commit b26aa765f743 Issue introduced in 5.6 with commit 548c4940b9f1 and fixed in 5.15.156 with commit fdfbf54d128a Issue introduced in 5.6 with commit 548c4940b9f1 and fixed in 6.1.87 with commit 19ff8fed3338 Issue introduced in 5.6 with commit 548c4940b9f1 and fixed in 6.6.28 with commit 5c7f2240d983 Issue introduced in 5.6 with commit 548c4940b9f1 and fixed in 6.8.7 with commit c31baa07f013 Issue introduced in 5.6 with commit 548c4940b9f1 and fixed in 6.9 with commit bf02d9fe0063 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-35958 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/amazon/ena/ena_netdev.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/b26aa765f7437e1bbe8db4c1641b12bd5dd378f0 https://git.kernel.org/stable/c/fdfbf54d128ab6ab255db138488f9650485795a2 https://git.kernel.org/stable/c/19ff8fed3338898b70b2aad831386c78564912e1 https://git.kernel.org/stable/c/5c7f2240d9835a7823d87f7460d8eae9f4e504c7 https://git.kernel.org/stable/c/c31baa07f01307b7ae05f3ce32b89d8e2ba0cc1d https://git.kernel.org/stable/c/bf02d9fe00632d22fa91d34749c7aacf397b6cde