Linux Media Controller development
 help / color / mirror / Atom feed
From: Sean Young <sean@mess.org>
To: Moksh Panicker <mokshpanicker.7@gmail.com>
Cc: mchehab@kernel.org, linux-media@vger.kernel.org,
	linux-kernel@vger.kernel.org, skhan@linuxfoundation.org,
	syzbot+2599e08a22e4565ea9f9@syzkaller.appspot.com
Subject: Re: [PATCH] media: rc: igorplugusb: Fix wrong pointer passed to usb_fill_control_urb()
Date: Wed, 17 Jun 2026 10:03:42 +0100	[thread overview]
Message-ID: <ajJi7gOLB610UYMR@extorris.mess.org> (raw)
In-Reply-To: <20260616214334.36525-1-mokshpanicker.7@gmail.com>

On Tue, Jun 16, 2026 at 09:43:34PM +0000, Moksh Panicker wrote:
> ir->request is already a pointer to struct usb_ctrlrequest, so passing
> &ir->request passes the address of the pointer rather than the pointer
> itself. This causes usb_submit_urb() to read garbage as the URB setup
> packet, resulting in a direction mismatch warning:
> 
>   usb 1-1: BOGUS control dir, pipe doesn't match bRequestType
> 
> Fix this by passing ir->request directly instead of &ir->request.

Already fixed and merged upstream, see commit
171022c7d594c133a45f92357a2a91475edabe20.

Thanks,

Sean

> 
> Reported-by: syzbot+2599e08a22e4565ea9f9@syzkaller.appspot.com
> Closes: https://syzkaller.appspot.com/bug?extid=2599e08a22e4565ea9f9
> Signed-off-by: Moksh Panicker <mokshpanicker.7@gmail.com>
> ---
>  drivers/media/rc/igorplugusb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/rc/igorplugusb.c b/drivers/media/rc/igorplugusb.c
> index 3e10f6fe8..b5117ee9f 100644
> --- a/drivers/media/rc/igorplugusb.c
> +++ b/drivers/media/rc/igorplugusb.c
> @@ -184,7 +184,7 @@ static int igorplugusb_probe(struct usb_interface *intf,
>  	if (!ir->buf_in)
>  		goto fail;
>  	usb_fill_control_urb(ir->urb, udev,
> -		usb_rcvctrlpipe(udev, 0), (uint8_t *)&ir->request,
> +		usb_rcvctrlpipe(udev, 0), (uint8_t *)ir->request,
>  		ir->buf_in, MAX_PACKET, igorplugusb_callback, ir);
>  
>  	usb_make_path(udev, ir->phys, sizeof(ir->phys));
> -- 
> 2.34.1
> 

      reply	other threads:[~2026-06-17  9:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-16 21:43 [PATCH] media: rc: igorplugusb: Fix wrong pointer passed to usb_fill_control_urb() Moksh Panicker
2026-06-17  9:03 ` Sean Young [this message]

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=ajJi7gOLB610UYMR@extorris.mess.org \
    --to=sean@mess.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=mokshpanicker.7@gmail.com \
    --cc=skhan@linuxfoundation.org \
    --cc=syzbot+2599e08a22e4565ea9f9@syzkaller.appspot.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox