Mathias Nyman
d39b5bad86
xhci: Fix crash if scatter gather is used with Immediate Data Transfer (IDT).
...
A second regression was found in the immediate data transfer (IDT)
support which was added to 5.2 kernel
IDT is used to transfer small amounts of data (up to 8 bytes) in the
field normally used for data dma address, thus avoiding dma mapping.
If the data was not already dma mapped, then IDT support assumed data was
in urb->transfer_buffer, and did not take into accound that even
small amounts of data (8 bytes) can be in a scatterlist instead.
This caused a NULL pointer dereference when sg_dma_len() was used
with non-dma mapped data.
Solve this by not using IDT if scatter gather buffer list is used.
Fixes: 33e39350ebd2 ("usb: xhci: add Immediate Data Transfer support")
Cc: <stable@vger.kernel.org> # v5.2
Reported-by: Maik Stohn <maik.stohn@seal-one.com>
Tested-by: Maik Stohn <maik.stohn@seal-one.com>
CC: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/1564044861-1445-1-git-send-email-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-25 11:26:42 +02:00
..
2019-01-22 09:08:17 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2018-05-31 12:54:22 +02:00
2019-05-21 08:34:49 +02:00
2019-07-03 18:52:20 +02:00
2019-07-03 18:52:20 +02:00
2017-11-07 15:45:02 +01:00
2019-06-03 16:00:08 +02:00
2018-06-25 21:44:43 +08:00
2018-05-04 14:35:12 -07:00
2019-01-18 10:07:05 +01:00
2017-11-07 15:45:02 +01:00
2018-06-28 19:32:42 +09:00
2018-12-17 14:07:59 +01:00
2019-01-30 09:22:35 +01:00
2019-07-25 10:40:02 +02:00
2018-03-09 09:43:53 -08:00
2017-11-07 15:45:02 +01:00
2017-11-04 11:48:02 +01:00
2018-07-20 12:50:37 +10:00
2018-09-28 15:03:37 +02:00
2018-07-13 15:41:56 +02:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2019-06-03 15:21:56 +02:00
2018-01-24 08:49:51 +01:00
2018-04-23 09:50:57 +02:00
2018-09-28 15:03:37 +02:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2018-09-28 15:03:37 +02:00
2018-05-31 12:54:22 +02:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2017-11-07 15:45:02 +01:00
2019-04-19 14:23:34 +02:00
2018-06-12 16:19:22 -07:00
2018-05-31 12:54:22 +02:00
2019-07-12 15:13:55 -07:00
2018-09-28 15:03:37 +02:00
2019-07-03 18:52:20 +02:00
2019-07-25 10:40:03 +02:00
2018-05-31 12:54:22 +02:00
2018-06-12 16:19:22 -07:00
2017-11-07 15:45:02 +01:00
2018-05-31 12:54:21 +02:00
2017-11-02 11:10:55 +01:00
2018-12-12 12:38:41 +01:00
2019-06-18 08:51:28 +02:00
2019-06-20 14:28:36 +02:00
2018-09-20 13:07:55 +02:00
2017-11-04 11:48:02 +01:00
2019-01-18 09:58:04 +01:00
2019-04-12 19:46:48 +05:30
2018-06-12 16:19:22 -07:00
2019-05-21 08:34:49 +02:00
2019-06-28 07:57:07 +02:00
2018-02-15 18:43:57 +01:00
2019-06-28 07:57:07 +02:00
2017-11-07 15:45:02 +01:00
2018-03-09 09:43:52 -08:00
2019-07-25 10:40:02 +02:00
2018-03-09 09:43:53 -08:00
2017-11-04 11:48:02 +01:00
2018-07-20 12:50:37 +10:00
2017-11-04 11:48:02 +01:00
2018-02-15 18:45:34 +01:00
2019-06-03 15:21:57 +02:00
2017-11-04 11:48:02 +01:00
2019-06-03 16:00:08 +02:00
2019-06-03 15:21:57 +02:00
2019-06-03 15:21:56 +02:00
2019-06-03 16:00:08 +02:00
2019-06-03 16:00:07 +02:00
2019-02-19 14:41:38 +01:00
2017-11-02 11:10:55 +01:00
2019-07-25 10:40:02 +02:00
2019-07-25 10:40:02 +02:00
2018-12-19 08:13:26 +01:00
2017-11-07 15:45:02 +01:00
2017-11-04 11:48:02 +01:00
2018-03-16 15:40:19 +01:00
2017-11-02 11:10:55 +01:00
2017-11-07 15:45:02 +01:00
2019-06-06 08:59:19 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2019-06-03 16:00:08 +02:00
2018-01-17 15:08:56 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-01-17 15:08:56 +01:00
2017-12-12 13:16:07 +01:00
2017-12-08 17:43:52 +01:00
2019-04-08 12:01:02 +01:00
2018-05-24 18:03:07 +02:00
2018-05-24 18:03:07 +02:00
2019-05-22 14:25:37 +02:00
2019-02-20 20:18:23 +01:00
2018-03-22 13:40:10 +01:00
2018-03-22 13:40:10 +01:00
2018-11-09 08:31:08 -08:00
2019-04-27 14:53:58 +02:00
2019-02-21 10:54:22 +01:00
2018-09-28 15:04:45 +02:00
2019-04-19 14:23:34 +02:00
2018-09-28 15:04:45 +02:00
2019-01-30 09:22:35 +01:00
2019-01-30 09:22:35 +01:00
2019-07-25 10:40:02 +02:00
2019-04-19 14:24:25 +02:00
2017-11-07 15:45:02 +01:00
2019-03-19 14:57:31 +01:00
2017-11-07 15:45:02 +01:00
2019-06-23 09:21:15 +02:00
2019-06-18 08:44:09 +02:00
2017-11-07 15:45:02 +01:00
2019-04-27 14:53:58 +02:00
2019-06-23 09:21:15 +02:00
2019-07-25 11:26:42 +02:00