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 51BB124B231 for ; Sat, 11 Jan 2025 14:31:11 +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=1736605871; cv=none; b=U2+/ih2HdsBDY3mdJwbMuxP1lpE2Dk1tjUQ8APJr21ZObbRwWcIpXUJaxfUIMJA9nrqV+eQaVLGpV8IkWxmaXS7X3eR9kUlH2MUJ9/RxekOHWq4rHd7LO6fn9QJ9Xtt2so8ZZtDIj/hxdejTU0Y1/36/JqRqEXe1wvkySkuPnIk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736605871; c=relaxed/simple; bh=5GApLEDJJrhary1mJpvoJaAMmFLkLywNxPMmVh4fXlg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=sfkpaIuqfdO6EZP7p/kNj/9S6m4viqpOAakLTKw13ioNO+1/auESQjlt5N4ynu9hPMIvrYuUUq8xcWq3Hcm8bjzihXAd19f4Dh+bmdK5s6ZPB31CxhDTysG5DgileiD4XDAlyIvypGbDhhHjVE8pNaIgger79cu9km5r0P7EVLs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=11hRhzUT; 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="11hRhzUT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 94365C4CED2; Sat, 11 Jan 2025 14:31:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1736605871; bh=5GApLEDJJrhary1mJpvoJaAMmFLkLywNxPMmVh4fXlg=; h=From:To:Cc:Subject:Date:Reply-to:From; b=11hRhzUT9PxAoB6sDQgxEezph3KKlO0GZr4SEQ0XmI9nNWpiZByKsb4IZfhyPbOB8 sBthB4NtpItSd6pYsC3LLpF20Fx/7+agV01rW3y0e35cn3VQ2TwFr90gxfzkLwmZT4 RDGw0z4aPbMpMXFMBBJ5crZSb9u0ijQEeHi9AHOQ= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-57843: virtio-net: fix overflow inside virtnet_rq_alloc Date: Sat, 11 Jan 2025 15:31:03 +0100 Message-ID: <2025011103-CVE-2024-57843-1c15@gregkh> X-Mailer: git-send-email 2.48.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=2629; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=5GApLEDJJrhary1mJpvoJaAMmFLkLywNxPMmVh4fXlg=; b=owGbwMvMwCRo6H6F97bub03G02pJDOlNDcsduTUFuHotd3U3nIvoYHpxU4eF87CBvP28Nwwva hTzFPd3xLIwCDIxyIopsnzZxnN0f8UhRS9D29Mwc1iZQIYwcHEKwETWiDLMU7vjZveR95bI3XPs rK3GuW+l7LOuMizY46gw41eFdo3xXZ2OROtbzxN9lScDAA== 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 overflow inside virtnet_rq_alloc When the frag just got a page, then may lead to regression on VM. Specially if the sysctl net.core.high_order_alloc_disable value is 1, then the frag always get a page when do refill. Which could see reliable crashes or scp failure (scp a file 100M in size to VM). The issue is that the virtnet_rq_dma takes up 16 bytes at the beginning of a new frag. When the frag size is larger than PAGE_SIZE, everything is fine. However, if the frag is only one page and the total size of the buffer and virtnet_rq_dma is larger than one page, an overflow may occur. The commit f9dac92ba908 ("virtio_ring: enable premapped mode whatever use_dma_api") introduced this problem. And we reverted some commits to fix this in last linux version. Now we try to enable it and fix this bug directly. Here, when the frag size is not enough, we reduce the buffer len to fix this problem. The Linux kernel CVE team has assigned CVE-2024-57843 to this issue. Affected and fixed versions =========================== Fixed in 6.6.66 with commit a8f7d6963768b114ec9644ff0148dde4c104e84b Fixed in 6.12.5 with commit 67a11de8965c2ab19e215fb6651d44847e068614 Fixed in 6.13-rc1 with commit 6aacd1484468361d1d04badfe75f264fa5314864 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-57843 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/a8f7d6963768b114ec9644ff0148dde4c104e84b https://git.kernel.org/stable/c/67a11de8965c2ab19e215fb6651d44847e068614 https://git.kernel.org/stable/c/6aacd1484468361d1d04badfe75f264fa5314864