From: Abhinav Saxena <xandfury@gmail.com>
To: Ian Abbott <abbotti@mev.co.uk>
Cc: Edward Adam Davis <eadavis@qq.com>,
syzbot+f1bb7e4ea47ea12b535c@syzkaller.appspotmail.com,
hsweeten@visionengravers.com, linux-kernel@vger.kernel.org,
syzkaller-bugs@googlegroups.com, linux-hardening@vger.kernel.org
Subject: Re: [PATCH] comedi: aio_iiro_16: Prevent invlaid irq number
Date: Sun, 28 Sep 2025 13:08:48 -0600 [thread overview]
Message-ID: <87frc62xyg.fsf@gmail.com> (raw)
In-Reply-To: <2f17944c-80ff-49a7-97ef-275f5e247e8f@mev.co.uk>
[-- Attachment #1: Type: text/plain, Size: 1691 bytes --]
Ian Abbott <abbotti@mev.co.uk> writes:
> On 08/07/2025 13:37, Edward Adam Davis wrote:
>> The irq number 0x2166 passed by the reproducer is too large and is not
>> within the supported range [2-7, 10-12, 14, or 15], which triggers the oob.
>> Fixes: ad7a370c8be4 (“staging: comedi: aio_iiro_16: add command
>> support for change of state detection”)
>> Reported-by: syzbot+f1bb7e4ea47ea12b535c@syzkaller.appspotmail.com
>> Closes: <https://syzkaller.appspot.com/bug?extid=f1bb7e4ea47ea12b535c>
>> Signed-off-by: Edward Adam Davis <eadavis@qq.com>
>> —
>> drivers/comedi/drivers/aio_iiro_16.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>> diff –git a/drivers/comedi/drivers/aio_iiro_16.c
>> b/drivers/comedi/drivers/aio_iiro_16.c
>> index b00fab0b89d4..e43730f00c8b 100644
>> — a/drivers/comedi/drivers/aio_iiro_16.c
>> +++ b/drivers/comedi/drivers/aio_iiro_16.c
>> @@ -177,7 +177,8 @@ static int aio_iiro_16_attach(struct comedi_device *dev,
>> * Digital input change of state interrupts are optionally supported
>> * using IRQ 2-7, 10-12, 14, or 15.
>> */
>> - if ((1 << it->options[1]) & 0xdcfc) {
>> + if (it->options[1] > 1 && it->options[1] < 16 &&
>> + (1 << it->options[1]) & 0xdcfc) {
>> ret = request_irq(it->options[1], aio_iiro_16_cos, 0,
>> dev->board_name, dev);
>> if (ret == 0)
>
> The patch is fine apart from the misspelling of “invalid” in the subject
> line, but I’d already submitted a patch for this before syzbot detected
> it:
>
> <https://lore.kernel.org/lkml/20250707134622.75403-1-abbotti@mev.co.uk/>
#syz fix: comedi: aio_iiro_16: Fix bit shift out of bounds
next prev parent reply other threads:[~2025-09-28 19:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-07 16:32 [syzbot] [kernel?] UBSAN: shift-out-of-bounds in aio_iiro_16_attach syzbot
2025-07-08 12:17 ` Edward Adam Davis
2025-07-08 12:37 ` syzbot
2025-07-08 12:37 ` [PATCH] comedi: aio_iiro_16: Prevent invlaid irq number Edward Adam Davis
2025-07-08 13:18 ` Ian Abbott
2025-09-28 19:08 ` Abhinav Saxena [this message]
2025-09-28 0:36 ` Forwarded: Re: [syzbot] [kernel?] UBSAN: shift-out-of-bounds in aio_iiro_16_attach syzbot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87frc62xyg.fsf@gmail.com \
--to=xandfury@gmail.com \
--cc=abbotti@mev.co.uk \
--cc=eadavis@qq.com \
--cc=hsweeten@visionengravers.com \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+f1bb7e4ea47ea12b535c@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.