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 301CEBE46 for ; Sat, 16 Aug 2025 11:14:59 +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=1755342899; cv=none; b=lFPGJymcY6sljURh3b4cLKVzrgCrwvOvOZsFrCp/N3CnAdY2JyBxHCzNcHxSYOgxqS1+b0LCKsoe32aRXmgG0jwQD2N7PpEecVPXIYAIb7zofbGKrmdTOqhCgyRvho1wTGWitnhDJj85Ax/ElKTa7BxG3cazd7TMJI6RKpf+2Qs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755342899; c=relaxed/simple; bh=//ieZFNboGVAeSxjjKdWu+Ovv/wLaNEGtsJR0nIFnLU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=iCs9b80crXwH4dT8BMN7hfTQu0kZ/FhWVVmN2aD/bjNZHc2eUgbXzv2b43GWXpKvoTeX85DitdNRgQsSBx+NgozHIXSjSs0fKoQN9FjzED5v/3H3nkKs3235MZ5ADZo3ZgRrmtqpZ1AygNX3jE7N78GsLs8kk/cia5NzSqkCZsY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=P9kLPXQz; 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="P9kLPXQz" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 94943C4CEEF; Sat, 16 Aug 2025 11:14:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1755342899; bh=//ieZFNboGVAeSxjjKdWu+Ovv/wLaNEGtsJR0nIFnLU=; h=From:To:Cc:Subject:Date:Reply-to:From; b=P9kLPXQz76rLV9HDIgC8w/WjtcbKX3omo3XxFZ/W2HNEPUA3s9gsihW3jdDU/wNt1 IhfFNc7TpWuxk/sv0tAfsfcefkxy6XvTpLHtNBFZh61P7HYN4LWtxGCeYLjpZKKSaY dw/Lm/XtIgYEaIh0eDYzrdS9kX533iDqHpiWUBZg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38530: comedi: pcl812: Fix bit shift out of bounds Date: Sat, 16 Aug 2025 13:14:01 +0200 Message-ID: <2025081655-CVE-2025-38530-1e2d@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=2950; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=ph3tIgsZtknXyLOOt4UuUcSHkcC/5vZ7UsSY8mVKZ+c=; b=owGbwMvMwCRo6H6F97bub03G02pJDBkL0j+vqxFbqB30ry/cYPOn3WL7Qi3V9XWf8T/h1pYrL FLQDb7QEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABOxnMKwYO7h1KPdKQL+r3c9 NvBqT3WPitn0lGF+wJbtDnt+P7My/idz4MAypyWP2WpcAQ== 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: pcl812: Fix bit shift out of bounds When checking for a supported IRQ number, the following test is used: if ((1 << it->options[1]) & board->irq_bits) { 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-38530 to this issue. Affected and fixed versions =========================== Issue introduced in 2.6.30 with commit fcdb427bc7cf5e9e5d7280cf09c08dec49b49432 and fixed in 6.1.147 with commit 5bfa301e1e59a9b1a7b62a800b54852337c97416 Issue introduced in 2.6.30 with commit fcdb427bc7cf5e9e5d7280cf09c08dec49b49432 and fixed in 6.6.100 with commit 7e470d8efd10725b189ca8951973a8425932398a Issue introduced in 2.6.30 with commit fcdb427bc7cf5e9e5d7280cf09c08dec49b49432 and fixed in 6.12.40 with commit a27e27eee313fe1c450b6af1e80e64412546cab4 Issue introduced in 2.6.30 with commit fcdb427bc7cf5e9e5d7280cf09c08dec49b49432 and fixed in 6.15.8 with commit 16c173abee315953fd17a279352fec4a1faee862 Issue introduced in 2.6.30 with commit fcdb427bc7cf5e9e5d7280cf09c08dec49b49432 and fixed in 6.16 with commit b14b076ce593f72585412fc7fd3747e03a5e3632 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-38530 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/pcl812.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/5bfa301e1e59a9b1a7b62a800b54852337c97416 https://git.kernel.org/stable/c/7e470d8efd10725b189ca8951973a8425932398a https://git.kernel.org/stable/c/a27e27eee313fe1c450b6af1e80e64412546cab4 https://git.kernel.org/stable/c/16c173abee315953fd17a279352fec4a1faee862 https://git.kernel.org/stable/c/b14b076ce593f72585412fc7fd3747e03a5e3632