reactos/drivers/usb
Adam Słaboń 20efea8fa4
[USBSTOR] Fix PdoHandleQueryInstanceId and increase serial number descriptor size to MAXIMUM_USB_STRING_LENGTH (#6413)
Serial number on some USB devices might exceed the number of 100 characters
(e.g. 120 characters on "SanDisk Ultra 3.2Gen1" pendrive) and cause buffer
overflow, resulting in usbstor.sys crash.

- Use pool allocation for instance ID generation.
  Fixes stack overflow on USB storage devices with large serial number.
- Print the LUN number as a hexadecimal, not as a character.
- Verify the serial number descriptor before using it.
- Increase the max descriptor size for serial number to
  MAXIMUM_USB_STRING_LENGTH. This fixes serial number string truncation.

Based on suggestions by disean and ThFabba.

CORE-17625
2024-02-16 18:48:33 +03:00
..
usbaudio [FORMATTING][NTOS][HAL][DRIVERS][SDK] Fix trailing spaces 2021-06-11 15:33:08 +03:00
usbccgp [BDASUP][PORTCLS][SYSAUDIO][USB] Use ExAllocatePoolZero() and ExFreePoolWithTag() (#5811) 2023-10-23 18:16:59 +02:00
usbd [CMAKE] Use modules instead of shared libraries 2019-04-06 17:43:38 +02:00
usbehci [USBEHCI] Avoid uninitialized return status in EHCI_ReopenEndpoint. 2021-10-27 19:27:33 -04:00
usbhub [FORMATTING][NTOS][HAL][DRIVERS][SDK] Fix trailing spaces 2021-06-11 15:33:08 +03:00
usbohci [FORMATTING][NTOS][HAL][DRIVERS][SDK] Fix trailing spaces 2021-06-11 15:33:08 +03:00
usbport [USBPORT] Fix incorrect use of bitfields. 2022-02-17 22:01:34 -05:00
usbstor [USBSTOR] Fix PdoHandleQueryInstanceId and increase serial number descriptor size to MAXIMUM_USB_STRING_LENGTH (#6413) 2024-02-16 18:48:33 +03:00
usbstor_new [BDASUP][PORTCLS][SYSAUDIO][USB] Use ExAllocatePoolZero() and ExFreePoolWithTag() (#5811) 2023-10-23 18:16:59 +02:00
usbuhci [USBUHCI] Fix always-false HcFlavor checks. 2021-10-27 19:27:33 -04:00
CMakeLists.txt [USB] Update the names of new USB drivers 2020-01-06 21:16:08 +02:00