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
usbccgp [BDASUP][PORTCLS][SYSAUDIO][USB] Use ExAllocatePoolZero() and ExFreePoolWithTag() (#5811) 2023-10-23 18:16:59 +02:00
usbd
usbehci
usbhub
usbohci
usbport
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
CMakeLists.txt