mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Kyungtae Kim <kt0755@gmail.com>
Cc: laurentiu.tudor@nxp.com, noring@nocrew.org,
	chunfeng.yun@mediatek.com, felipe.balbi@linux.intel.com,
	tweek@google.com, tony@atomide.com, rrangel@chromium.org,
	m.szyprowski@samsung.com, Dave Tian <dave.jing.tian@gmail.com>,
	linux-usb@vger.kernel.og, syzkaller <syzkaller@googlegroups.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: BUG: KASAN: use-after-free in usb_hcd_unlink_urb+0x5f/0x170 drivers/usb/core/hcd.c
Date: Mon, 23 Mar 2020 07:39:09 +0100	[thread overview]
Message-ID: <20200323063909.GA129571@kroah.com> (raw)
In-Reply-To: <CAEAjamtb2Kbn0He5O++=d_HCG1eQvLnGGbcVUOQ76+NfDiNybQ@mail.gmail.com>

On Mon, Mar 23, 2020 at 02:16:43AM -0400, Kyungtae Kim wrote:
> We report a bug (in linux-5.5.11) found by FuzzUSB (a modified version
> of syzkaller)
> 
> In function usb_hcd_unlink_urb (driver/usb/core/hcd.c:1607), it tries to
> read "urb->use_count". But it seems the instance "urb" was
> already freed (right after urb->dev at line 1597) by the function "urb_destroy"
> in a different thread, which caused memory access violation.
> To solve, it may need to check if urb is valid before urb->use_count,
> to avoid such freed memory access.

Can you send a patch for this?  Do you have a reproducer?

thanks,

greg k-h

  reply	other threads:[~2020-03-23  6:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-23  6:16 Kyungtae Kim
2020-03-23  6:39 ` Greg KH [this message]
2020-03-23 16:45 ` Andrey Konovalov
2020-03-23 21:50   ` Kyungtae Kim

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=20200323063909.GA129571@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=chunfeng.yun@mediatek.com \
    --cc=dave.jing.tian@gmail.com \
    --cc=felipe.balbi@linux.intel.com \
    --cc=kt0755@gmail.com \
    --cc=laurentiu.tudor@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.og \
    --cc=m.szyprowski@samsung.com \
    --cc=noring@nocrew.org \
    --cc=rrangel@chromium.org \
    --cc=syzkaller@googlegroups.com \
    --cc=tony@atomide.com \
    --cc=tweek@google.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome