From: Alan Stern <stern@rowland.harvard.edu>
To: Greg KH <greg@kroah.com>
Cc: Peter Chen <hzpeterchen@gmail.com>,
Andrey Konovalov <andreyknvl@google.com>,
USB list <linux-usb@vger.kernel.org>
Subject: USB: core: prevent malicious bNumInterfaces overflow
Date: Wed, 13 Dec 2017 10:30:50 -0500 (EST) [thread overview]
Message-ID: <Pine.LNX.4.44L0.1712131029010.1351-100000@iolanthe.rowland.org> (raw)
On Wed, 13 Dec 2017, Greg KH wrote:
> > > --- usb-4.x.orig/drivers/usb/core/config.c
> > > +++ usb-4.x/drivers/usb/core/config.c
> > > @@ -555,6 +555,9 @@ static int usb_parse_configuration(struc
> > > unsigned iad_num = 0;
> > >
> > > memcpy(&config->desc, buffer, USB_DT_CONFIG_SIZE);
> > > + nintf = nintf_orig = config->desc.bNumInterfaces;
> > > + config->desc.bNumInterfaces = 0; // Adjusted later
> > > +
> >
> > The comment format?
>
> Is fine, I've given up that fight :)
In fact, Linus posted an email sometime in the last few weeks, in which
he said that he had changed his mind about // comments. He called it
the one thing that C++ got right!
Also, checkpatch didn't complain.
Alan Stern
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2017-12-13 15:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-13 15:30 Alan Stern [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-12-13 11:28 USB: core: prevent malicious bNumInterfaces overflow Greg KH
2017-12-13 7:51 Greg KH
2017-12-13 1:27 Peter Chen
2017-12-12 19:25 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=Pine.LNX.4.44L0.1712131029010.1351-100000@iolanthe.rowland.org \
--to=stern@rowland.harvard.edu \
--cc=andreyknvl@google.com \
--cc=greg@kroah.com \
--cc=hzpeterchen@gmail.com \
--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 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.