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 C6C83145FE4 for ; Sat, 17 Aug 2024 09:23:14 +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=1723886594; cv=none; b=bxKW7ZyQNvtHKWonh/jyvGIqDC9WqsD60ZgcOQ/1TyN+JrynG9MCjxuh7ziIW4XxItXyFFCV80EQ5T77OH9gsLLMYuNeSB81vUhrHar3SHMjSZtkg9shzOaEjTeA63V3Sr+5kqg7ogajequRWjWmmMESknj/SwkPlcSLnheR4Oo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723886594; c=relaxed/simple; bh=lsT43TlU5yTDz86wQE26n1Z+d2P4VZ6Tk29UjyTqXpE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=RI6JykyPqBdGY66iAeqRKp3EASH7YOrsutNWN4A5JMpzGET4s0SCvEDCJyYJFQ+TXLy1CrU5jWBu0deOtSy17Lnv7dEhAD6ZmWEmIl9W8NvwKn8bo6y5mJhLa1hPB4rqGuNZqyfDXXEModQPrD4j3pG0lDKwgBYrmnFjo23n/bc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Nw2ycO6t; 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="Nw2ycO6t" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 513DBC116B1; Sat, 17 Aug 2024 09:23:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1723886594; bh=lsT43TlU5yTDz86wQE26n1Z+d2P4VZ6Tk29UjyTqXpE=; h=From:To:Cc:Subject:Date:Reply-to:From; b=Nw2ycO6t5Jsm0dwbLpFER3y4QKK2ICYERA5KeiINGuj3V1j3tBIXAfr6ntcllg7+7 N2SM7ENKczqbyNOm5CQIC0F0LPxy/8BJv46GD8coBKmfaR0Xizdb0EPAdyx7zeNQQ3 4vsXYmygKb2lWBJVg5kXQaDUVtS9qJrqpDb5P4Y0= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-43835: virtio_net: Fix napi_skb_cache_put warning Date: Sat, 17 Aug 2024 11:22:39 +0200 Message-ID: <2024081728-CVE-2024-43835-5f11@gregkh> X-Mailer: git-send-email 2.46.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=2532; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=lsT43TlU5yTDz86wQE26n1Z+d2P4VZ6Tk29UjyTqXpE=; b=owGbwMvMwCRo6H6F97bub03G02pJDGkHsq+4PDG9ltH7bqnoDsd4vw85MeKP9lybJXY3QalGR 2D9bzGTjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZiIXRTDgiUiug9Nc9mdq0zi /fYe8v+S5CHixTCbre+q/HEH4a7mN0zf3DOjK388DNUDAA== 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: virtio_net: Fix napi_skb_cache_put warning After the commit bdacf3e34945 ("net: Use nested-BH locking for napi_alloc_cache.") was merged, the following warning began to appear: WARNING: CPU: 5 PID: 1 at net/core/skbuff.c:1451 napi_skb_cache_put+0x82/0x4b0 __warn+0x12f/0x340 napi_skb_cache_put+0x82/0x4b0 napi_skb_cache_put+0x82/0x4b0 report_bug+0x165/0x370 handle_bug+0x3d/0x80 exc_invalid_op+0x1a/0x50 asm_exc_invalid_op+0x1a/0x20 __free_old_xmit+0x1c8/0x510 napi_skb_cache_put+0x82/0x4b0 __free_old_xmit+0x1c8/0x510 __free_old_xmit+0x1c8/0x510 __pfx___free_old_xmit+0x10/0x10 The issue arises because virtio is assuming it's running in NAPI context even when it's not, such as in the netpoll case. To resolve this, modify virtnet_poll_tx() to only set NAPI when budget is available. Same for virtnet_poll_cleantx(), which always assumed that it was in a NAPI context. The Linux kernel CVE team has assigned CVE-2024-43835 to this issue. Affected and fixed versions =========================== Issue introduced in 5.0 with commit df133f3f9625 and fixed in 6.10.3 with commit 468a729b7889 Issue introduced in 5.0 with commit df133f3f9625 and fixed in 6.11-rc1 with commit f8321fa75102 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-43835 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/virtio_net.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/468a729b78895893d0e580ceea49bed8ada2a2bd https://git.kernel.org/stable/c/f8321fa75102246d7415a6af441872f6637c93ab