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 254F23D6F for ; Thu, 1 May 2025 12:56:44 +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=1746104205; cv=none; b=QSw/eiWuvo8DsEjdgMAwLkgKBOoevtsKG6vLXLD++bYbA8K2sLCyPM4j4oL5m80BdB66mjN0eHhGqkr7Tyl61Nk9Rkt0o9G6Gs1848CejMtSh5DwNzeIyHU9fv1nwF3Y5xITtAeSv3Mzfk24FpHEeCGJfUOvSA4CDq9zsNeF/2U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746104205; c=relaxed/simple; bh=hPhQGytE5YD5TNE5W2IQEkPhWX4Vc0Mr/SCGs5CULz0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=imVbDKf03kK6U3PK8icoi5JFa7ptZhZ/AOCUa430UDDP9Gpnp2pEXYM7UqCDxrdCHORRm8myjpTUhXlmDUFJvoTZWNJT1hsSNCAKykjahKj/V9jc37jkVA6WRuOU/izxkhhLdR8htkeqx+z8duW/jZcbUQfDWDX0EigNRaKdIbU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=xe0c0Fvm; 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="xe0c0Fvm" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 293A0C4CEE4; Thu, 1 May 2025 12:56:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1746104204; bh=hPhQGytE5YD5TNE5W2IQEkPhWX4Vc0Mr/SCGs5CULz0=; h=From:To:Cc:Subject:Date:Reply-to:From; b=xe0c0Fvmr2nEWu9ldiQWooJjp1as4mXjIOVWd55YAAFxVnmGi2eSZ2Bb9LaQPbyd9 Cj4/gY5UaUpq/+QZKlaTrNvg2o2++rcMv5+KVjLm3kZod4pxQkedWE6SpXfkI3aZuq 9CKjGxUgGTe+NDLtkDWNUAzlvIdAduyhZVFFpSCk= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-23140: misc: pci_endpoint_test: Avoid issue of interrupts remaining after request_irq error Date: Thu, 1 May 2025 14:56:20 +0200 Message-ID: <2025050124-CVE-2025-23140-bd0d@gregkh> X-Mailer: git-send-email 2.49.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=3185; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=XiOEBZot1N14EPS5Px13xEUdTmSzvT616E9lKVVYvTY=; b=owGbwMvMwCRo6H6F97bub03G02pJDBnC+RXswXGb/L/MZ9fk9Nke43xMPj5qdf7bwjculfv6f Y/PWxjXEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABMJecowP/fmn5vfTxftvvh+ 6ZWq367fOF9x7GGYp8xwcnVdWqvmxscmW+bfubdys2z0WgA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: misc: pci_endpoint_test: Avoid issue of interrupts remaining after request_irq error After devm_request_irq() fails with error in pci_endpoint_test_request_irq(), the pci_endpoint_test_free_irq_vectors() is called assuming that all IRQs have been released. However, some requested IRQs remain unreleased, so there are still /proc/irq/* entries remaining, and this results in WARN() with the following message: remove_proc_entry: removing non-empty directory 'irq/30', leaking at least 'pci-endpoint-test.0' WARNING: CPU: 0 PID: 202 at fs/proc/generic.c:719 remove_proc_entry +0x190/0x19c To solve this issue, set the number of remaining IRQs to test->num_irqs, and release IRQs in advance by calling pci_endpoint_test_release_irq(). [kwilczynski: commit log] The Linux kernel CVE team has assigned CVE-2025-23140 to this issue. Affected and fixed versions =========================== Issue introduced in 4.19 with commit e03327122e2c8e6ae4565ef5b3d3cbe4364546a1 and fixed in 6.1.135 with commit 9d5118b107b1a2353ed0dff24404aee2e6b7ca0a Issue introduced in 4.19 with commit e03327122e2c8e6ae4565ef5b3d3cbe4364546a1 and fixed in 6.6.88 with commit 5a4b7181213268c9b07bef8800905528435db44a Issue introduced in 4.19 with commit e03327122e2c8e6ae4565ef5b3d3cbe4364546a1 and fixed in 6.12.25 with commit 0557e70e2aeba8647bf5a950820b67cfb86533db Issue introduced in 4.19 with commit e03327122e2c8e6ae4565ef5b3d3cbe4364546a1 and fixed in 6.14.3 with commit 770407f6173f4f39f4e2c1b54422b79ce6c98bdb Issue introduced in 4.19 with commit e03327122e2c8e6ae4565ef5b3d3cbe4364546a1 and fixed in 6.15-rc1 with commit f6cb7828c8e17520d4f5afb416515d3fae1af9a9 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-2025-23140 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/misc/pci_endpoint_test.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/9d5118b107b1a2353ed0dff24404aee2e6b7ca0a https://git.kernel.org/stable/c/5a4b7181213268c9b07bef8800905528435db44a https://git.kernel.org/stable/c/0557e70e2aeba8647bf5a950820b67cfb86533db https://git.kernel.org/stable/c/770407f6173f4f39f4e2c1b54422b79ce6c98bdb https://git.kernel.org/stable/c/f6cb7828c8e17520d4f5afb416515d3fae1af9a9