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 DEC381F949 for ; Mon, 28 Jul 2025 11:22:37 +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=1753701758; cv=none; b=TrkkjUg7fixL1hcrxxjLd886fHtkPr1CZfj6+qLUla+RHqHkuQZSffFc3bB0BCiR0N6W7DrASymjzmXJeTC2WOhlBfrT3ttsf46LuPhXnKQOOCiDk+WXcGJbKqIbETR4jJUDm4sAVkVroeb8sf7lA8MENAvKESGDt+23qAyDaxY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753701758; c=relaxed/simple; bh=s5Bv7qIMEMK7MTRZJcmbGRss4PC/81zpGwPzs6HA1vM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=UzElccE+QjCGLGnZ47zB80q4u8kZuL41L33/bEIDx5tTfk9oNXV/NqFnRPzGy62ZDZjYDHMMCGxEDU3b4xGAXaQfIadkIZof/C7qFU4rU+fI+mbRoGFUMABad6jf82/rnkA6+2uvm0lLF3NGqJTRfC+Y3qgKN2UB9Xl61Gmndec= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=WYbDNyBq; 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="WYbDNyBq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 03E41C4CEE7; Mon, 28 Jul 2025 11:22:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1753701757; bh=s5Bv7qIMEMK7MTRZJcmbGRss4PC/81zpGwPzs6HA1vM=; h=From:To:Cc:Subject:Date:Reply-to:From; b=WYbDNyBqRtnhBI2fWUj95VOxvsAQwrASXeANbJzxhy41p0CMZgw+Ahv5sLp7gXjUt y+C3Ern2ExmcDnr7qj6iW745HbDiDXmeavJ2EEK0ezD8LqjFN3pD3gP/ip9Y3Zf/EH tjfqq80oPR1FqOlpCzftAABfq5vm/liBQNsC28g8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38482: comedi: das6402: Fix bit shift out of bounds Date: Mon, 28 Jul 2025 13:22:24 +0200 Message-ID: <2025072814-CVE-2025-38482-f4ed@gregkh> X-Mailer: git-send-email 2.50.1 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=2996; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=t3jLBMYtIXxk6Aj1iqhyDxx0efVawaazE+aQcz13gDk=; b=owGbwMvMwCRo6H6F97bub03G02pJDBntsWlBTza3iP4qu/bqhc+yT2UVj+cy1CyO2HXprV1Bg uqjL7v6OmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiCzIZ5uk2bNiWx939ZrP0 y+Lti1lSn3/idWeYX+zW7GugaVQqWyX7U+/DgZzlu/YdBQA= 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: das6402: Fix bit shift out of bounds When checking for a supported IRQ number, the following test is used: /* IRQs 2,3,5,6,7, 10,11,15 are valid for "enhanced" mode */ if ((1 << it->options[1]) & 0x8cec) { However, `it->options[i]` is an unchecked `int` value from userspace, so the shift amount could be negative or out of bounds. Fix the test by requiring `it->options[1]` to be within bounds before proceeding with the original test. Valid `it->options[1]` values that select the IRQ will be in the range [1,15]. The value 0 explicitly disables the use of interrupts. The Linux kernel CVE team has assigned CVE-2025-38482 to this issue. Affected and fixed versions =========================== Issue introduced in 3.15 with commit 79e5e6addbb18bf56075f0ff552094a28636dd03 and fixed in 6.1.147 with commit a18a42e77545afcacd6a2b8d9fc16191b87454df Issue introduced in 3.15 with commit 79e5e6addbb18bf56075f0ff552094a28636dd03 and fixed in 6.6.100 with commit 8a3637027ceeba4ca5e500b23cb7d24c25592513 Issue introduced in 3.15 with commit 79e5e6addbb18bf56075f0ff552094a28636dd03 and fixed in 6.12.40 with commit 3eab654f5d199ecd45403c6588cda63e491fcfca Issue introduced in 3.15 with commit 79e5e6addbb18bf56075f0ff552094a28636dd03 and fixed in 6.15.8 with commit 4a3c18cde02e35aba87e0ad5672b3e1c72dda5a4 Issue introduced in 3.15 with commit 79e5e6addbb18bf56075f0ff552094a28636dd03 and fixed in 6.16 with commit 70f2b28b5243df557f51c054c20058ae207baaac 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-38482 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/das6402.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/a18a42e77545afcacd6a2b8d9fc16191b87454df https://git.kernel.org/stable/c/8a3637027ceeba4ca5e500b23cb7d24c25592513 https://git.kernel.org/stable/c/3eab654f5d199ecd45403c6588cda63e491fcfca https://git.kernel.org/stable/c/4a3c18cde02e35aba87e0ad5672b3e1c72dda5a4 https://git.kernel.org/stable/c/70f2b28b5243df557f51c054c20058ae207baaac