[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201112192524.GB287229@rowland.harvard.edu>
Date: Thu, 12 Nov 2020 14:25:24 -0500
From: Alan Stern <stern@...land.harvard.edu>
To: John Boero <boeroboy@...il.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Felipe Balbi <balbi@...nel.org>, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] usb: core: Null deref in kernel with USB webcams.
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
Powered by blists - more mailing lists