[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YJ40S1eHnbg1dsYv@kroah.com>
Date: Fri, 14 May 2021 10:26:51 +0200
From: Greg KH <greg@...ah.com>
To: Hayes Wang <hayeswang@...ltek.com>
Cc: Alan Stern <stern@...land.harvard.edu>,
syzbot <syzbot+95afd23673f5dd295c57@...kaller.appspotmail.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"kuba@...nel.org" <kuba@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"syzkaller-bugs@...glegroups.com" <syzkaller-bugs@...glegroups.com>,
nic_swsd <nic_swsd@...ltek.com>
Subject: Re: [syzbot] WARNING in rtl8152_probe
On Fri, May 14, 2021 at 07:50:19AM +0000, Hayes Wang wrote:
> Greg KH <greg@...ah.com>
> > Sent: Friday, May 14, 2021 2:49 PM
> [...]
> > Because people can create "bad" devices and plug them into a system
> > which causes the driver to load and then potentially crash the system or
> > do other bad things.
> >
> > USB drivers now need to be able to handle "malicious" devices, it's been
> > that way for many years now.
>
> My question is that even I check whole the USB descriptor, the malicious
> devices could duplicate it easily to pass my checks. That is, I could add a
> lot of checks, but it still doesn't prevent malicious devices. Is this meaningful?
Checking the whole USB decriptor is fine, yes, they can duplicate that.
So that means you need to validate _ALL_ data coming from the device
that it is in an acceptable range of values that the driver can
correctly handle.
thanks,
greg k-h
Powered by blists - more mailing lists