mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-01 18:55:12 +00:00
7652dd2c5c
A type of inconsistency that can show up in control URBs is when the setup packet's wLength value does not match the URB's transfer_buffer_length field. The two should always be equal; differences could lead to information leaks or undefined behavior for OUT transfers or overruns for IN transfers. This patch adds a test for such mismatches during URB submission. If the test fails, the submission is rejected with a -EBADR error code (which is not used elsewhere in the USB core), and a debugging message is logged for people interested in tracking down these errors. Reviewed-by: Johan Hovold <johan@kernel.org> Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Link: https://lore.kernel.org/r/20210526153244.GA1400430@rowland.harvard.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
||
---|---|---|
.. | ||
anchors.rst | ||
bulk-streams.rst | ||
callbacks.rst | ||
dma.rst | ||
dwc3.rst | ||
error-codes.rst | ||
gadget.rst | ||
hotplug.rst | ||
index.rst | ||
persist.rst | ||
power-management.rst | ||
typec_bus.rst | ||
typec.rst | ||
URB.rst | ||
usb3-debug-port.rst | ||
usb.rst | ||
writing_musb_glue_layer.rst | ||
writing_usb_driver.rst |