public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [BUG] usb: serial: garmin_gps: A possible concurrency use-after-free bug
@ 2018-12-20 13:41 Jia-Ju Bai
  2018-12-20 13:46 ` Johan Hovold
  0 siblings, 1 reply; 3+ messages in thread
From: Jia-Ju Bai @ 2018-12-20 13:41 UTC (permalink / raw)
  To: Johan Hovold, Greg KH; +Cc: linux-usb, Linux Kernel Mailing List

In drivers/usb/serial/garmin_gps.c,
the functions garmin_read_bulk_callback() and garmin_write_bulk_callback()
may be concurrently executed.

In garmin_write_bulk_callback() on line 969:
     kfree(urb->transfer_buffer);
In garmin_read_bulk_callback() on line 1165:
     unsigned char *data = urb->transfer_buffer;
Thus, a concurrency use-after-free bug may occur.

This possible bug is found by a static analysis tool written by myself.


Best wishes,
Jia-Ju Bai

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-12-20 13:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-20 13:41 [BUG] usb: serial: garmin_gps: A possible concurrency use-after-free bug Jia-Ju Bai
2018-12-20 13:46 ` Johan Hovold
2018-12-20 13:48   ` Jia-Ju Bai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox