Bug 204257
Summary: | kernel NULL pointer dereference | ||
---|---|---|---|
Product: | Drivers | Reporter: | Maik Stohn (maik.stohn) |
Component: | USB | Assignee: | Greg Kroah-Hartman (greg) |
Status: | RESOLVED PATCH_ALREADY_AVAILABLE | ||
Severity: | normal | ||
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 5.2 / 5.2.1 / + | Subsystem: | |
Regression: | No | Bisected commit-id: |
Description
Maik Stohn
2019-07-21 21:53:50 UTC
On Sun, Jul 21, 2019 at 09:53:50PM +0000, bugzilla-daemon@bugzilla.kernel.org wrote: > https://bugzilla.kernel.org/show_bug.cgi?id=204257 > > Bug ID: 204257 > Summary: kernel NULL pointer dereference > Product: Drivers > Version: 2.5 > Kernel Version: 5.2 / 5.2.1 / + All USB bugs should be sent to the linux-usb@vger.kernel.org mailing list, and not entered into bugzilla. Please bring this issue up there, if it is still a problem in the latest kernel release. The cause of this regression was found and a patch is available / included since 5.2.5 kernel: commit ddc2ea0c281bfa75dfedeba1a336ce449a7b9480 Author: Mathias Nyman <mathias.nyman@linux.intel.com> Date: Thu Jul 25 11:54:21 2019 +0300 xhci: Fix crash if scatter gather is used with Immediate Data Transfer (IDT). commit d39b5bad8658d6d94cb2d98a44a7e159db4f5030 upstream. 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> |