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 8EE6E303A0B for ; Wed, 12 Nov 2025 10:24:24 +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=1762943064; cv=none; b=YGA8vDCWy7UmjCPKdebYnu+740Z3f1hgv8RsrtXBuEYzuIDxddfb+Nwieggq2i5gyl4Q8KdhErImglzsuhkOTQ0ldTKMaBiE7VC26ZlkCEwcleq+kT3Llm4rMQmXBFePMU2D37zt3H45rDKx18d05KM6I0yh7VuhTpL6oCYOyy0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762943064; c=relaxed/simple; bh=A31zDnjwgWlJfArbZWuJ2RTlzUualf89RhKSc4s5PdY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Xkj/a8Z1dSdrV8P3kHa5jvxUcWn9e9pRzgnX2ubyQNku8TlTv72gurqlnK7lhnhbd7cixonR8SZfY8L7rb+wZ/XJMKgVDZU3IIMM7d4XWsBrmjDoPZ4bo7RYENfJ+xQZU4obJtHwiZERs5bKPTiNSdbW/q24nnB+xuqVUCQOasU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=yjLdb2zR; 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="yjLdb2zR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4F7D9C4CEF8; Wed, 12 Nov 2025 10:24:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1762943064; bh=A31zDnjwgWlJfArbZWuJ2RTlzUualf89RhKSc4s5PdY=; h=From:To:Cc:Subject:Date:Reply-to:From; b=yjLdb2zR3R6OPXjGMHktNMC6vlnOrjt1EdKZw9OhPe7KXCObTBPIyMiOuv/vNR1lC R+GtmTL12S7UCuM++j2q2xWTgMtCRFJwFBlps4rWIOpTF3RU/SHgKjRR0pFD3N+soH hZTHpjrkQuNwJMdZDXYn0/hTeCHYB2SIomemYOPI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-40117: misc: pci_endpoint_test: Fix array underflow in pci_endpoint_test_ioctl() Date: Wed, 12 Nov 2025 19:23:53 +0900 Message-ID: <2025111251-CVE-2025-40117-82a4@gregkh> X-Mailer: git-send-email 2.51.2 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=2123; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=krdp17b29C8hvoht/hYk8udt5zrPEJ9HQOqCsWKZHiA=; b=owGbwMvMwCRo6H6F97bub03G02pJDJkiCRY7Kuc+N81pzCrcyezRL6SStehKxN7NqeXWjcucd twvOf61I5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACbSbcswi0k5xblHa1Gucruj 7NUT1yZ2non8zbDgumJA05p/r5UNrRca3HtwMmxPjn0qAA== 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: Fix array underflow in pci_endpoint_test_ioctl() Commit eefb83790a0d ("misc: pci_endpoint_test: Add doorbell test case") added NO_BAR (-1) to the pci_barno enum which, in practical terms, changes the enum from an unsigned int to a signed int. If the user passes a negative number in pci_endpoint_test_ioctl() then it results in an array underflow in pci_endpoint_test_bar(). The Linux kernel CVE team has assigned CVE-2025-40117 to this issue. Affected and fixed versions =========================== Issue introduced in 6.17 with commit eefb83790a0dda112d1755e4f5e213738d717e76 and fixed in 6.17.3 with commit 6df3687922570f753574c40b35e83b26b32292d0 Issue introduced in 6.17 with commit eefb83790a0dda112d1755e4f5e213738d717e76 and fixed in 6.18-rc1 with commit 1ad82f9db13d85667366044acdfb02009d576c5a 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-40117 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/6df3687922570f753574c40b35e83b26b32292d0 https://git.kernel.org/stable/c/1ad82f9db13d85667366044acdfb02009d576c5a