1
0
Fork 0
mirror of https://github.com/reactos/reactos.git synced 2025-06-06 09:50:43 +00:00
reactos/drivers/usb/usbstor
Adam Słaboń 20efea8fa4
[USBSTOR] Fix PdoHandleQueryInstanceId and increase serial number descriptor size to MAXIMUM_USB_STRING_LENGTH ()
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 () 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
misc.c [BDASUP][PORTCLS][SYSAUDIO][USB] Use ExAllocatePoolZero() and ExFreePoolWithTag() () 2023-10-23 18:16:59 +02:00
pdo.c [USBSTOR] Fix PdoHandleQueryInstanceId and increase serial number descriptor size to MAXIMUM_USB_STRING_LENGTH () 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 () 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