Linux-USB Archive on lore.kernel.org
 help / color / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org, Johan Hovold <johan@kernel.org>
Subject: [PATCH 0/4] USB: fix NULL-deref and alternate settings bugs
Date: Tue, 10 Dec 2019 12:25:57 +0100
Message-ID: <20191210112601.3561-1-johan@kernel.org> (raw)

I stumbled over a couple potential NULL-pointer dereferences due to
drivers using the first altsetting instead of the current one when doing
descriptor sanity checks.

Turns out we have a quite a few drivers getting this wrong even if this
would mostly be an issue on kernels with panic_on_warn set due to the
WARN() in usb_submit_urb().

Since we've started backporting fixes for such warnings (e.g. as
reported by syzbot), I've marked these for stable as well.

Johan


Johan Hovold (4):
  USB: atm: ueagle-atm: add missing endpoint check
  USB: adutux: fix interface sanity check
  USB: idmouse: fix interface sanity checks
  USB: serial: io_edgeport: fix epic endpoint lookup

 drivers/usb/atm/ueagle-atm.c     | 18 ++++++++++++------
 drivers/usb/misc/adutux.c        |  2 +-
 drivers/usb/misc/idmouse.c       |  2 +-
 drivers/usb/serial/io_edgeport.c | 10 ++++++----
 4 files changed, 20 insertions(+), 12 deletions(-)

-- 
2.24.0


             reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-10 11:25 Johan Hovold [this message]
2019-12-10 11:25 ` [PATCH 1/4] USB: atm: ueagle-atm: add missing endpoint check Johan Hovold
2019-12-10 11:25 ` [PATCH 2/4] USB: adutux: fix interface sanity check Johan Hovold
2019-12-10 11:26 ` [PATCH 3/4] USB: idmouse: fix interface sanity checks Johan Hovold
2019-12-10 11:26 ` [PATCH 4/4] USB: serial: io_edgeport: fix epic endpoint lookup 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=20191210112601.3561-1-johan@kernel.org \
    --to=johan@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --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

Linux-USB Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-usb/0 linux-usb/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-usb linux-usb/ https://lore.kernel.org/linux-usb \
		linux-usb@vger.kernel.org
	public-inbox-index linux-usb

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-usb


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git