Skip to contentSkip to conversation

CVE-2025-38529: comedi: aio_iiro_16: Fix bit shift out of bounds

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Aug 16, 2025

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

comedi: aio_iiro_16: Fix bit shift out of bounds

When checking for a supported IRQ number, the following test is used:

	if ((1 << it->options[1]) & 0xdcfc) {

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-38529 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 4.0 with commit ad7a370c8be47247f68f7187cc82f4f25a347116 and fixed in 6.1.147 with commit ff30dd3f15f443d2a0085b12ec2cc95d44f35fa7
	Issue introduced in 4.0 with commit ad7a370c8be47247f68f7187cc82f4f25a347116 and fixed in 6.6.100 with commit 955e8835855fed8e87f7d8c8075564a1746c1b4c
	Issue introduced in 4.0 with commit ad7a370c8be47247f68f7187cc82f4f25a347116 and fixed in 6.12.40 with commit e0f3c0867d7d231c70984f05c97752caacd0daba
	Issue introduced in 4.0 with commit ad7a370c8be47247f68f7187cc82f4f25a347116 and fixed in 6.15.8 with commit 43ddd82e6a91913cea1c078e782afd8de60c3a53
	Issue introduced in 4.0 with commit ad7a370c8be47247f68f7187cc82f4f25a347116 and fixed in 6.16 with commit 66acb1586737a22dd7b78abc63213b1bcaa100e4

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-38529

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/aio_iiro_16.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/ff30dd3f15f443d2a0085b12ec2cc95d44f35fa7
	https://git.kernel.org/stable/c/955e8835855fed8e87f7d8c8075564a1746c1b4c
	https://git.kernel.org/stable/c/e0f3c0867d7d231c70984f05c97752caacd0daba
	https://git.kernel.org/stable/c/43ddd82e6a91913cea1c078e782afd8de60c3a53
	https://git.kernel.org/stable/c/66acb1586737a22dd7b78abc63213b1bcaa100e4