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 749DE1581E6 for ; Fri, 3 May 2024 17:46:19 +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=1714758379; cv=none; b=aNX3kTliOPI5XN9kAnSmCLTJdaQTEC3B+d3fz5L8G1DUJR8smz5X5cdcrTfvfru/QfSSaKqxftXKVb53vfVjs5QrUOPdpXa4I5N641haw4N6a2rU7YYJ8me5yJ+SF+tci4ys59UvlBprKEm8ADhUSn/P/UisHxcJldgzWNPRdMQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714758379; c=relaxed/simple; bh=JZwxWlv0n5eJ7sdcAne6xIfqOS+3xr0pGPwzoWkvc1g=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=PD4CnZiSKDyaPLEHg8vazPIYkUuQLQqw75XTHzXwbAzIMy2ivFRPni8Y3573wP0RS453D1fesGUNMtxo4WiESp4m/KwOWYTkqSPW9HJzJU/HrRNiz7B0n9AT9Qr6y+1ZGqHB75AhwcQTaeeuJAdKaKABsj+5LQKr5PEzFh+IKy4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=vIo2MSMy; 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="vIo2MSMy" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D05FC116B1; Fri, 3 May 2024 17:46:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1714758379; bh=JZwxWlv0n5eJ7sdcAne6xIfqOS+3xr0pGPwzoWkvc1g=; h=From:To:Cc:Subject:Date:Reply-to:From; b=vIo2MSMybaN7FEd92a29XRONTv7ig50eA2QExvPEpO1rtPZK6M+dNRDO1TH2NHy8J wXzjm7J9+KUQ/r5bEi6sfoJz2smOxEfeSfbNmD22OiIVTuuYE2dvX6tx+NxPGy6P1i Mcrfo6m6A4h8s+183vtMw4l12Wqz8vMyo31nD6HQ= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-48690: ice: Fix DMA mappings leak Date: Fri, 3 May 2024 19:45:46 +0200 Message-ID: <2024050346-CVE-2022-48690-53bc@gregkh> X-Mailer: git-send-email 2.45.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=2520; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=JZwxWlv0n5eJ7sdcAne6xIfqOS+3xr0pGPwzoWkvc1g=; b=owGbwMvMwCRo6H6F97bub03G02pJDGmmSqdObt20Pm///LUnuN+sb2D81vtgXVm+4Wpj6Q+7p y7yuFWt1RHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQATWXOYYa6sVNM2UybZFJ3g qOxUB73paxOsmhjmKd7jlu1U5OXlTzJbH7e+iXuS+7q9AA== 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: ice: Fix DMA mappings leak Fix leak, when user changes ring parameters. During reallocation of RX buffers, new DMA mappings are created for those buffers. New buffers with different RX ring count should substitute older ones, but those buffers were freed in ice_vsi_cfg_rxq and reallocated again with ice_alloc_rx_buf. kfree on rx_buf caused leak of already mapped DMA. Reallocate ZC with xdp_buf struct, when BPF program loads. Reallocate back to rx_buf, when BPF program unloads. If BPF program is loaded/unloaded and XSK pools are created, reallocate RX queues accordingly in XDP_SETUP_XSK_POOL handler. Steps for reproduction: while : do for ((i=0; i<=8160; i=i+32)) do ethtool -G enp130s0f0 rx $i tx $i sleep 0.5 ethtool -g enp130s0f0 done done The Linux kernel CVE team has assigned CVE-2022-48690 to this issue. Affected and fixed versions =========================== Issue introduced in 5.16 with commit 617f3e1b588c and fixed in 5.19.9 with commit 07f40e9f0ff3 Issue introduced in 5.16 with commit 617f3e1b588c and fixed in 6.0 with commit 7e753eb675f0 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-2022-48690 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/intel/ice/ice_base.c drivers/net/ethernet/intel/ice/ice_main.c drivers/net/ethernet/intel/ice/ice_xsk.c drivers/net/ethernet/intel/ice/ice_xsk.h 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/07f40e9f0ff342eb3e97d5c544783b7cb641689c https://git.kernel.org/stable/c/7e753eb675f0523207b184558638ee2eed6c9ac2