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 49BC518659 for ; Fri, 5 Apr 2024 08:25:10 +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=1712305510; cv=none; b=okWF9mDSf8XX3PCk5T1dxNWAfWgHca+16hv+E7LU6+qZqdy/PEVO9G0MBmycJ815BUdXq/NdGrfoFZh1qhcnowbiMOTG4Q1XBpOEOvS+6O9ki0ttE+8XW+q8fSLB79VwkwJkfWvqUpn7XXy+eJKl+aq27Z/MKf/17sKn8p2WfRs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712305510; c=relaxed/simple; bh=RQ/BESDjypLXsfoWnQMJz5sGhitFIRHe+xj6QV5nk8M=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=cAhc7a6Z8PtxXoIvMnwRGUDYhV1G3cryrIWPmOqM06bqWqtftAeARHJrDG/3JL1mQmCCWZT6gyQeVu1HlqsCgdJS7spHxk9qN4ODLUJS2wqlnQszc+Op0BW5DWWsAAU0wLUKgDf+rAwF+moniqeDVv5TCfOlS4mD+PWuWgsHK3Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=xjRv6O1R; 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="xjRv6O1R" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 87B12C433C7; Fri, 5 Apr 2024 08:25:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1712305509; bh=RQ/BESDjypLXsfoWnQMJz5sGhitFIRHe+xj6QV5nk8M=; h=From:To:Cc:Subject:Date:Reply-to:From; b=xjRv6O1RcCWzeSYzJdvo6Oyp0arjbBUWZ4jpB05CXB+b4Xj3jcXBkfqHKXVUeAgve wkM6JwlM8+Clg4u/ofXhBEbAyglbfBx3eNqmLiHz+kISluDF7+SPmChQNQnDy0G8hB zlSoehKix7GQSOwqMiIG44LxNtjInywGyQmJr74s= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-27437: vfio/pci: Disable auto-enable of exclusive INTx IRQ Date: Fri, 5 Apr 2024 10:24:53 +0200 Message-ID: <2024040551-CVE-2024-27437-cc07@gregkh> X-Mailer: git-send-email 2.44.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=2748; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=RQ/BESDjypLXsfoWnQMJz5sGhitFIRHe+xj6QV5nk8M=; b=owGbwMvMwCRo6H6F97bub03G02pJDGn8W4NnfnB4ssBPQOPvbYa9xUuL1qn7srGFzwi6+/x7u 98pr0sWHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRxBcMc0X8Jx8+Pfe4oLj3 rnVzBVZOu8c+eynD/Bjf2gBnpr6XaSw1Db6Lf+55/4jzCAA= 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: vfio/pci: Disable auto-enable of exclusive INTx IRQ Currently for devices requiring masking at the irqchip for INTx, ie. devices without DisINTx support, the IRQ is enabled in request_irq() and subsequently disabled as necessary to align with the masked status flag. This presents a window where the interrupt could fire between these events, resulting in the IRQ incrementing the disable depth twice. This would be unrecoverable for a user since the masked flag prevents nested enables through vfio. Instead, invert the logic using IRQF_NO_AUTOEN such that exclusive INTx is never auto-enabled, then unmask as required. The Linux kernel CVE team has assigned CVE-2024-27437 to this issue. Affected and fixed versions =========================== Issue introduced in 3.6 with commit 89e1f7d4c66d and fixed in 6.1.84 with commit 139dfcc4d723 Issue introduced in 3.6 with commit 89e1f7d4c66d and fixed in 6.6.24 with commit 2a4a666c4510 Issue introduced in 3.6 with commit 89e1f7d4c66d and fixed in 6.7.12 with commit 3b3491ad0f80 Issue introduced in 3.6 with commit 89e1f7d4c66d and fixed in 6.8.3 with commit bf0bc84a20e6 Issue introduced in 3.6 with commit 89e1f7d4c66d and fixed in 6.9-rc1 with commit fe9a7082684e 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-27437 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/vfio/pci/vfio_pci_intrs.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/139dfcc4d723ab13469881200c7d80f49d776060 https://git.kernel.org/stable/c/2a4a666c45107206605b7b5bc20545f8aabc4fa2 https://git.kernel.org/stable/c/3b3491ad0f80d913e7d255941d4470f4a4d9bfda https://git.kernel.org/stable/c/bf0bc84a20e6109ab07d5dc072067bd01eb931ec https://git.kernel.org/stable/c/fe9a7082684eb059b925c535682e68c34d487d43