From: Alan Stern <stern@rowland.harvard.edu>
To: John Boero <boeroboy@gmail.com>
Cc: 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: Thu, 12 Nov 2020 14:25:24 -0500 [thread overview]
Message-ID: <20201112192524.GB287229@rowland.harvard.edu> (raw)
In-Reply-To: <CAO5W59jZdDgSBE3Tr79u7TuCrdsirhisFxKH6aCH5oE4soOz1g@mail.gmail.com>
On Thu, Nov 12, 2020 at 06:15:08PM +0000, John Boero wrote:
> Then why does line 278 right below it check for NULL?
Are you asking about line 278 in drivers/usb/core/usb.c? The statement
which says:
if (!config)
return NULL;
This is because it is perfectly valid for config to be NULL at this
point. But it is not valid for dev to be NULL. If dev is NULL then
there is a bug in the caller.
Alan Stern
next prev parent reply other threads:[~2020-11-12 19:25 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 [this message]
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
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=20201112192524.GB287229@rowland.harvard.edu \
--to=stern@rowland.harvard.edu \
--cc=balbi@kernel.org \
--cc=boeroboy@gmail.com \
--cc=gregkh@linuxfoundation.org \
--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®