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 BE56431328B for ; Fri, 5 Sep 2025 17:22:17 +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=1757092937; cv=none; b=EEOJg5G2XYYddR9jj8RUYlJ9hFqeSGFTcD2CoHZwQ0qRGgjm4W8p7nwpyXU6D0fc7AlrTLg79/KCknelj1t1noEbWok1WDHYKs+Dvf4xppPIaPOUFVOLW9GrHj+HiiIA5tCXYp7GKzGvvpKRxb31A3f8qmi6Db1ueavGH707RJE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757092937; c=relaxed/simple; bh=klw3xU9AUFXCeZvEH21JhZfAhlvB0ojVfmNM99U18sg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=EwdEdbk84uWeHtx6ZAvwe5UFz8F8sgenKXivLRK1zS3DslEbyz/Z+EvU/JmXrcGPuXRUkI54AHHPyEVR4UzpABHOI9RUfpnsEls0Gf0LiajcJ5T4mzpJzxjRYw8a28A8WnBKSGc3GcSEyFK5yGxZvVKqkJOof44sozIJcb5xiIM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=syaJFlWQ; 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="syaJFlWQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC4A0C4CEF1; Fri, 5 Sep 2025 17:22:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1757092937; bh=klw3xU9AUFXCeZvEH21JhZfAhlvB0ojVfmNM99U18sg=; h=From:To:Cc:Subject:Date:Reply-to:From; b=syaJFlWQIb8/BCNqYXY84+i+m4BdIwcSexm2uwrD016wnU74YgfOxM/MIdFjbv0dN +GtghWY2LRqER7mbeL+60aex/Jf3gL14nfONZh8xwR5b1bNn+toZsk5UEhrocLkvV5 fzaqOk3C6OXmKTW14ykK0OUQtCK5yy9qHt/+9dm4= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-39685: comedi: pcl726: Prevent invalid irq number Date: Fri, 5 Sep 2025 19:20:59 +0200 Message-ID: <2025090546-CVE-2025-39685-ddff@gregkh> X-Mailer: git-send-email 2.51.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=3428; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=+5p6gcxNcbY5TZ6a/ISBp2U6h20E83SuYIOfOtEthEE=; b=owGbwMvMwCRo6H6F97bub03G02pJDBm7pd+VLg+NDO5lm215xP3j3TWH9/t9uTx3y4Ilmoet2 DguOR3f0RHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQATadnJsGD3l/VJahdfz5J0 W7ND8rPjG0atmF6GBZPkDjN2eOx6NzOuauu3D7e/rtwy0QQA 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: comedi: pcl726: Prevent invalid irq number The reproducer passed in an irq number(0x80008000) that was too large, which triggered the oob. Added an interrupt number check to prevent users from passing in an irq number that was too large. If `it->options[1]` is 31, then `1 << it->options[1]` is still invalid because it shifts a 1-bit into the sign bit (which is UB in C). Possible solutions include reducing the upper bound on the `it->options[1]` value to 30 or lower, or using `1U << it->options[1]`. The old code would just not attempt to request the IRQ if the `options[1]` value were invalid. And it would still configure the device without interrupts even if the call to `request_irq` returned an error. So it would be better to combine this test with the test below. The Linux kernel CVE team has assigned CVE-2025-39685 to this issue. Affected and fixed versions =========================== Issue introduced in 3.13 with commit fff46207245cd9e39c05b638afaee2478e64914b and fixed in 5.15.190 with commit bab220b0bb5af652007e278e8e8357f952b0e1ea Issue introduced in 3.13 with commit fff46207245cd9e39c05b638afaee2478e64914b and fixed in 6.1.149 with commit 5a33d07c94ba91306093e823112a7aa9727549f6 Issue introduced in 3.13 with commit fff46207245cd9e39c05b638afaee2478e64914b and fixed in 6.6.103 with commit 0eb4ed2aa261dee228f1668dbfa6d87353e8162d Issue introduced in 3.13 with commit fff46207245cd9e39c05b638afaee2478e64914b and fixed in 6.12.44 with commit a3cfcd0c78c80ca7cd80372dc28f77d01be57bf6 Issue introduced in 3.13 with commit fff46207245cd9e39c05b638afaee2478e64914b and fixed in 6.16.4 with commit d8992c9a01f81128f36acb7c5755530e21fcd059 Issue introduced in 3.13 with commit fff46207245cd9e39c05b638afaee2478e64914b and fixed in 6.17-rc3 with commit 96cb948408b3adb69df7e451ba7da9d21f814d00 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-39685 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/comedi/drivers/pcl726.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/bab220b0bb5af652007e278e8e8357f952b0e1ea https://git.kernel.org/stable/c/5a33d07c94ba91306093e823112a7aa9727549f6 https://git.kernel.org/stable/c/0eb4ed2aa261dee228f1668dbfa6d87353e8162d https://git.kernel.org/stable/c/a3cfcd0c78c80ca7cd80372dc28f77d01be57bf6 https://git.kernel.org/stable/c/d8992c9a01f81128f36acb7c5755530e21fcd059 https://git.kernel.org/stable/c/96cb948408b3adb69df7e451ba7da9d21f814d00