freebsd-dev/sys/dev/usb
John Baldwin 282381aa53 rsu: Don't modify read-only firmware block.
The firmware header loaded into an rsu(4) device has to be customized
to reflect device settings.  The driver was overwriting the header
from the shared firmware image before sending it to the device.  If
two devices attached at the same time with different settings, one
device could potentially get a corrupted header.  The recent changes
in a095390344 exposed this bug in the
form of a panic as the firmware blobs are now marked read-only in
object files and mapped read-only by the kernel.

To avoid the bug, change the driver to allocate a copy of the firmware
header on the stack that is initialized before writing it to the
device.

PR:		252163
Reported by:	vidwer+fbsdbugs@gmail.com
Tested by:	vidwer+fbsdbugs@gmail.com
Reviewed by:	hselasky, bz, emaste
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D27850
2020-12-30 15:21:35 -08:00
..
controller ohci(4): remove support for Sun PCIO-2 USB controllers 2020-12-25 19:47:46 +01:00
gadget usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
input wmt: quiet gcc -Wparentheses 2020-12-24 12:49:27 -08:00
misc usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
net Add support for USB-C and TB3 Gen2 to if_ure(4). 2020-12-24 12:59:19 +01:00
quirk usb: Replace ITUNERNET vendor with MICROCHIP and improve product names 2020-12-18 23:31:36 +00:00
serial uplcom: add ATen/Prolific USB-232 Controller D USB ID 2020-11-17 18:28:20 +00:00
storage USB umass: add quirk to not probe 2020-12-01 18:24:06 +00:00
template usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
video usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
wlan rsu: Don't modify read-only firmware block. 2020-12-30 15:21:35 -08:00
ufm_ioctl.h Regularize my copyright notice 2019-12-04 16:56:11 +00:00
uftdiio.h
uled_ioctl.h
usb_bus.h Make USB statistics per device instead of per bus. 2019-12-27 20:29:13 +00:00
usb_busdma.c usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
usb_busdma.h usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
usb_cdc.h
usb_controller.h usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
usb_core.c
usb_core.h Use more standard types for manipulating pointers. 2020-12-16 00:27:28 +00:00
usb_debug.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (2 of many) 2020-02-15 18:52:12 +00:00
usb_debug.h
usb_dev.c usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
usb_dev.h
usb_device.c Improve handling of alternate settings in the USB stack. 2020-12-15 15:36:41 +00:00
usb_device.h Refresh the USB device strings when a USB device is re-enumerated. 2020-05-11 20:55:04 +00:00
usb_dynamic.c
usb_dynamic.h
usb_endian.h
usb_error.c
usb_fdt_support.c
usb_fdt_support.h
usb_freebsd_loader.h usb(4): Stop checking for failures from malloc(M_WAITOK). 2020-07-22 14:32:47 +00:00
usb_freebsd.h usb(4): Stop checking for failures from malloc(M_WAITOK). 2020-07-22 14:32:47 +00:00
usb_generic.c Implement the USB_GET_DEVICEINFO ioctl(2) for uhid(4). 2020-10-31 21:53:23 +00:00
usb_generic.h Implement the USB_GET_DEVICEINFO ioctl(2) for uhid(4). 2020-10-31 21:53:23 +00:00
usb_handle_request.c usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
usb_hid.c usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
usb_hub_acpi.c usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
usb_hub_private.h usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
usb_hub.c usb_hub: fix whitespace 2020-11-09 23:36:51 +00:00
usb_hub.h
usb_if.m
usb_ioctl.h
usb_lookup.c usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
usb_mbuf.c usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
usb_mbuf.h
usb_msctest.c usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
usb_msctest.h
usb_parse.c Improve handling of alternate settings in the USB stack. 2020-12-15 11:51:17 +00:00
usb_pci.h
usb_pf.c usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
usb_pf.h Fix build of USB bootloader code by adding checks for _STANDALONE being defined. 2020-11-18 13:22:22 +00:00
usb_process.c usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
usb_process.h
usb_request.c Improve handling of alternate settings in the USB stack. 2020-12-15 12:05:07 +00:00
usb_request.h
usb_transfer.c usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
usb_transfer.h Use __containerof() instead of home-rolled versions. 2020-12-17 20:45:10 +00:00
usb_util.c
usb_util.h
usb.h Fix build of USB bootloader code by adding checks for _STANDALONE being defined. 2020-11-18 13:22:22 +00:00
usbdevs Add support for USB-C and TB3 Gen2 to if_ure(4). 2020-12-24 12:59:19 +01:00
usbdi_util.h
usbdi.h Improve handling of alternate settings in the USB stack. 2020-12-15 12:05:07 +00:00
usbhid.h Fix build of USB bootloader code by adding checks for _STANDALONE being defined. 2020-11-18 13:22:22 +00:00