From: Johan Hovold <johan@kernel.org>
To: Oliver Neukum <oneukum@suse.com>
Cc: linux-usb@vger.kernel.org, johan@kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] cypress_m8: add sanity checking
Date: Wed, 16 Mar 2016 11:08:21 -0400 [thread overview]
Message-ID: <20160316150821.GC2546@localhost> (raw)
In-Reply-To: <1458137989-30819-1-git-send-email-oneukum@suse.com>
On Wed, Mar 16, 2016 at 03:19:49PM +0100, Oliver Neukum wrote:
> An attack using missing endpoints exists.
> CVE-2016-3137
>
> Signed-off-by: Oliver Neukum <ONeukum@suse.com>
> CC: stable@vger.kernel.org
> ---
> drivers/usb/serial/cypress_m8.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c
> index 01bf533..1c6cbf5 100644
> --- a/drivers/usb/serial/cypress_m8.c
> +++ b/drivers/usb/serial/cypress_m8.c
> @@ -447,6 +447,9 @@ static int cypress_generic_port_probe(struct usb_serial_port *port)
> struct usb_serial *serial = port->serial;
> struct cypress_private *priv;
>
> + if (!port->interrupt_out_urb || !port->interrupt_in_urb)
> + return -ENODEV;
> +
This look good, but would you mind adding dev_err in case the expected
endpoints are missing?
You can also remove the interrupt-in-urb check in open().
> priv = kzalloc(sizeof(struct cypress_private), GFP_KERNEL);
> if (!priv)
> return -ENOMEM;
Thanks,
Johan
next prev parent reply other threads:[~2016-03-16 15:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-16 14:19 [PATCH] cypress_m8: add sanity checking Oliver Neukum
2016-03-16 15:08 ` Johan Hovold [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-03-17 10:07 Oliver Neukum
2016-03-17 14:46 ` Johan Hovold
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=20160316150821.GC2546@localhost \
--to=johan@kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=oneukum@suse.com \
--cc=stable@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.