[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <87mukv4mo6.fsf@miraculix.mork.no>
Date: Fri, 12 Apr 2019 11:07:05 +0200
From: Bjørn Mork <bjorn@...k.no>
To: Yang Xiao <92siuyang@...il.com>
Cc: kbuild-all@...org, linux-usb@...r.kernel.org,
linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
greg@...ah.com, mchehab@...nel.org,
Kees Cook <keescook@...omium.org>, hans.verkuil@...co.com,
Young Xiao <YangX92@...mail.com>
Subject: Re: [PATCH] USB: s2255 & stkwebcam: fix oops with malicious USB descriptors
Yang Xiao <92siuyang@...il.com> writes:
> If given malicious descritors that spcify 0 for the number of endpoints,
> then there is a null pointer deference when calling function
> usb_endpoint_is_bulk_in.
>
> for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) {
Try this:
#include <stdio.h>
int main()
{
int i;
for (i=0; i<0; ++i)
printf("%d\n");
return 0;
}
How many lines did it print?
Bjørn
Powered by blists - more mailing lists