freebsd-dev/sys/dev/usb/wlan
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
..
if_rsu.c rsu: Don't modify read-only firmware block. 2020-12-30 15:21:35 -08:00
if_rsureg.h
if_rum.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (2 of many) 2020-02-15 18:52:12 +00:00
if_rumfw.h
if_rumreg.h usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
if_rumvar.h
if_run.c WiFi: fix ieee80211_media_change() callers 2020-09-07 15:35:40 +00:00
if_runreg.h usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
if_runvar.h [run] Fix up tx/rx frame size. 2020-06-03 22:30:44 +00:00
if_uath.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (2 of many) 2020-02-15 18:52:12 +00:00
if_uathreg.h
if_uathvar.h
if_upgt.c usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
if_upgtvar.h
if_ural.c usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
if_uralreg.h usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
if_uralvar.h usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
if_urtw.c usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
if_urtwreg.h
if_urtwvar.h
if_zyd.c usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00
if_zydfw.h
if_zydreg.h usb: clean up empty lines in .c and .h files 2020-09-01 21:26:44 +00:00