reactos/drivers/usb/usbstor
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
..
CMakeLists.txt [USBSTOR] General refactoring. 2020-06-12 16:55:27 +03:00
descriptor.c [USBSTOR] Fix PdoHandleQueryInstanceId and increase serial number descriptor size to MAXIMUM_USB_STRING_LENGTH (#6413) 2024-02-16 18:48:33 +03:00
disk.c [USBSTOR] Remove workarounds for old storage stack 2020-12-06 23:32:29 +03:00
error.c [USBSTOR] Move PDO's Inquiry data and FDO's SCSI context 2020-06-12 16:55:27 +03:00
fdo.c [DRIVERS] Use IoForwardIrpSynchronously in drivers 2022-01-05 02:17:56 +03:00
guid.c Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
misc.c [BDASUP][PORTCLS][SYSAUDIO][USB] Use ExAllocatePoolZero() and ExFreePoolWithTag() (#5811) 2023-10-23 18:16:59 +02:00
pdo.c [USBSTOR] Fix PdoHandleQueryInstanceId and increase serial number descriptor size to MAXIMUM_USB_STRING_LENGTH (#6413) 2024-02-16 18:48:33 +03:00
queue.c [FORMATTING][NTOS][HAL][DRIVERS][SDK] Fix trailing spaces 2021-06-11 15:33:08 +03:00
scsi.c [USBSTOR] Fix unused variable introduced in 94e61c3 2020-06-13 03:20:08 +03:00
usbstor.c [USBSTOR] Register dumb IRP_MJ_SYSTEM_CONTROL handler. 2019-06-11 04:39:43 +03:00
usbstor.h [USBSTOR] Fix PdoHandleQueryInstanceId and increase serial number descriptor size to MAXIMUM_USB_STRING_LENGTH (#6413) 2024-02-16 18:48:33 +03:00
usbstor.inf [INF] Set manufacturer as ReactOS Project for consistency 2022-06-27 17:00:18 +03:00
usbstor.rc Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00