opnsense-src/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
input wmt: quiet gcc -Wparentheses 2020-12-24 12:49:27 -08:00
misc
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
video
wlan rsu: Don't modify read-only firmware block. 2020-12-30 15:21:35 -08:00
ufm_ioctl.h
uftdiio.h
uled_ioctl.h
usb.h Fix build of USB bootloader code by adding checks for _STANDALONE being defined. 2020-11-18 13:22:22 +00:00
usb_bus.h
usb_busdma.c
usb_busdma.h
usb_cdc.h
usb_controller.h
usb_core.c
usb_core.h Use more standard types for manipulating pointers. 2020-12-16 00:27:28 +00:00
usb_debug.c
usb_debug.h
usb_dev.c
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
usb_dynamic.c
usb_dynamic.h
usb_endian.h
usb_error.c
usb_fdt_support.c
usb_fdt_support.h
usb_freebsd.h
usb_freebsd_loader.h
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_hid.c
usb_hub.c usb_hub: fix whitespace 2020-11-09 23:36:51 +00:00
usb_hub.h
usb_hub_acpi.c
usb_hub_private.h
usb_if.m
usb_ioctl.h
usb_lookup.c
usb_mbuf.c
usb_mbuf.h
usb_msctest.c
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_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_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_transfer.h Use __containerof() instead of home-rolled versions. 2020-12-17 20:45:10 +00:00
usb_util.c
usb_util.h
usbdevs Add support for USB-C and TB3 Gen2 to if_ure(4). 2020-12-24 12:59:19 +01:00
usbdi.h Improve handling of alternate settings in the USB stack. 2020-12-15 12:05:07 +00:00
usbdi_util.h
usbhid.h Fix build of USB bootloader code by adding checks for _STANDALONE being defined. 2020-11-18 13:22:22 +00:00