From: Alan Stern <stern@rowland.harvard.edu>
To: John Boero <boeroboy@gmail.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Felipe Balbi <balbi@kernel.org>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: core: Null deref in kernel with USB webcams.
Date: Fri, 13 Nov 2020 12:16:58 -0500 [thread overview]
Message-ID: <20201113171658.GF322940@rowland.harvard.edu> (raw)
In-Reply-To: <CAO5W59iqXGeAQTP7hzzRmbqwZUcK=vwuJ7pFzzNzZ9o11_k2tw@mail.gmail.com>
On Fri, Nov 13, 2020 at 04:45:52PM +0000, John Boero wrote:
> Sorry I wanted to include a pastebin or link but was trying to follow maillist
> guidelines and not include links or exceed wrap guidelines. Full contents:
> https://paste.centos.org/view/3746bc40
>
> Yes I understand the return dodges the config dereference.
>
> Original line usb.c:281 is the original error:
>
> 280| for (i = 0; i < config->desc.bNumInterfaces; i++)
> 281| if (config->interface[i]->altsetting[0]
> 282| .desc.bInterfaceNumber == ifnum)
> 283| return config->interface[i];
Okay. Without having looked at the code, I would guess that uvcvideo's
uvc_ioctl_streamon() handler -- or some routine beneath it -- either
doesn't lock the USB interface while starting I/O, or doesn't check
(while holding the lock) to see whether the driver has been unbound.
This sort of error (config->interface[i] == NULL) is what you expect to
see if a driver tries to carry out I/O to a device that has been
unplugged and that it has been unbound from.
Alan Stern
next prev parent reply other threads:[~2020-11-13 17:17 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-12 15:52 John Boero
2020-11-12 15:54 ` John Boero
2020-11-12 17:05 ` Greg Kroah-Hartman
2020-11-12 17:13 ` John Boero
2020-11-12 17:57 ` Greg Kroah-Hartman
2020-11-12 18:15 ` John Boero
2020-11-12 18:54 ` Greg Kroah-Hartman
2020-11-12 19:25 ` Alan Stern
2020-11-13 13:18 ` John Boero
2020-11-13 16:34 ` Alan Stern
2020-11-13 16:45 ` John Boero
2020-11-13 17:16 ` Alan Stern [this message]
2020-11-22 20:03 ` John Boero
2020-11-23 15:26 ` Alan Stern
2020-11-12 19:23 ` Alan Stern
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=20201113171658.GF322940@rowland.harvard.edu \
--to=stern@rowland.harvard.edu \
--cc=balbi@kernel.org \
--cc=boeroboy@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/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
all inboxes | Powered by JetHome®