From: "Bjørn Mork" <bjorn@mork.no>
To: Yang Xiao <92siuyang@gmail.com>
Cc: kbuild-all@01.org, linux-usb@vger.kernel.org,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
greg@kroah.com, mchehab@kernel.org,
Kees Cook <keescook@chromium.org>,
hans.verkuil@cisco.com, Young Xiao <YangX92@hotmail.com>
Subject: USB: s2255 & stkwebcam: fix oops with malicious USB descriptors
Date: Fri, 12 Apr 2019 11:07:05 +0200 [thread overview]
Message-ID: <87mukv4mo6.fsf@miraculix.mork.no> (raw)
Yang Xiao <92siuyang@gmail.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
WARNING: multiple messages have this Message-ID (diff)
From: "Bjørn Mork" <bjorn@mork.no>
To: Yang Xiao <92siuyang@gmail.com>
Cc: kbuild-all@01.org, linux-usb@vger.kernel.org,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
greg@kroah.com, mchehab@kernel.org,
Kees Cook <keescook@chromium.org>,
hans.verkuil@cisco.com, Young Xiao <YangX92@hotmail.com>
Subject: Re: [PATCH] USB: s2255 & stkwebcam: fix oops with malicious USB descriptors
Date: Fri, 12 Apr 2019 11:07:05 +0200 [thread overview]
Message-ID: <87mukv4mo6.fsf@miraculix.mork.no> (raw)
Message-ID: <20190412090705.-PgR5-7b1Rhx5VdrmoVMQlDm5Eq5tRALtjyzf_Djy18@z> (raw)
In-Reply-To: <CAKgHYH05R2CQ1XmS-KCTtL0J49D2kpnkBgyYxdPc47SNpaf8vA@mail.gmail.com> (Yang Xiao's message of "Fri, 12 Apr 2019 16:45:52 +0800")
Yang Xiao <92siuyang@gmail.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
next reply other threads:[~2019-04-12 9:07 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-12 9:07 Bjørn Mork [this message]
2019-04-12 9:07 ` [PATCH] USB: s2255 & stkwebcam: fix oops with malicious USB descriptors Bjørn Mork
-- strict thread matches above, loose matches on Subject: below --
2019-04-16 11:33 Johan Hovold
2019-04-16 11:26 Johan Hovold
2019-04-16 10:06 Greg KH
2019-04-12 9:36 Young Xiao
2019-04-12 9:36 ` [PATCH] " Yang Xiao
2019-04-12 8:58 Young Xiao
2019-04-12 8:58 ` [PATCH] " Yang Xiao
2019-04-12 8:04 Bjørn Mork
2019-04-12 8:04 ` [PATCH] " Bjørn Mork
2019-04-12 2:39 Young Xiao
2019-04-12 2:39 ` [PATCH] " Young Xiao
2019-04-11 4:54 Young Xiao
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=87mukv4mo6.fsf@miraculix.mork.no \
--to=bjorn@mork.no \
--cc=92siuyang@gmail.com \
--cc=YangX92@hotmail.com \
--cc=greg@kroah.com \
--cc=hans.verkuil@cisco.com \
--cc=kbuild-all@01.org \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mchehab@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.