reactos/drivers
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
..
base [BOOTVID] Fix definition of GetFontPtr(). 2023-12-24 21:41:09 +01:00
battery [BATTC] Make input buffer on IOCTL_BATTERY_QUERY_TAG optional 2024-02-01 10:08:51 +01:00
bluetooth [REACTOS] Silence warnings in 3r-party code 2021-07-23 22:03:48 +02:00
bus [CMBATT] Correctly print UNICODE_STRING 2024-02-05 18:04:01 +01:00
crypto [KSECDD] Fix RtlEncryptMemory and improve test 2020-09-25 09:39:51 +02:00
filesystems [VFATFS] FATGetNextDirEntry(): Fix 1 MSVC 'warning C4267' (#6179) 2023-12-23 21:24:51 +01:00
filters [FLTMGR] CreateClientPort(): Fix ObInsertObject() error handling 2021-12-28 02:27:50 +03:00
hid [ACLEDIT][MSIMG32][HIDCLASS] Fix DLL-main function argument type in spec file. 2022-10-06 16:16:40 +02:00
input [INPORT] Fix swapped buttons for the inport bus mouse 2023-08-05 16:40:07 +03:00
ksfilter [HDAUDBUS][KS][WDMAUD] Use ExAllocatePoolZero() and ExFreePoolWithTag() (#5792) 2023-10-20 18:09:03 +02:00
multimedia [BDASUP][KMIXER][MMIXER][STREAM] Replace meaningless YDEBUG (#5818) 2023-10-31 12:04:24 +00:00
network [SDK][VIRTIO][NETKVM] Make VirtIO a separate library (#6280) 2024-01-16 17:55:35 -08:00
parallel [DRIVERS] Use IoForwardIrpSynchronously in drivers 2022-01-05 02:17:56 +03:00
processor [DRIVERS][INF] Update Romanian (ro-RO) translation (#6088) 2023-12-09 20:19:54 +01:00
sac [SACDRV] Add 2 OBJ_KERNEL_HANDLE 2022-05-08 19:42:49 +02:00
serial [DRIVERS] Add some missing OBJ_KERNEL_HANDLE (#4493) 2022-05-07 22:12:19 +03:00
setup [BLUE] Optimize ScrIoControl for speed (#5185) 2023-03-28 08:12:38 +09:00
storage [DRIVERS][INF] Update Romanian (ro-RO) translation (#6088) 2023-12-09 20:19:54 +01:00
usb [USBSTOR] Fix PdoHandleQueryInstanceId and increase serial number descriptor size to MAXIMUM_USB_STRING_LENGTH (#6413) 2024-02-16 18:48:33 +03:00
wdm [DRIVERS][INF] Update Romanian (ro-RO) translation (#6088) 2023-12-09 20:19:54 +01:00
wmi [FORMATTING][NTOS][HAL][DRIVERS][SDK] Fix trailing spaces 2021-06-11 15:33:08 +03:00
CMakeLists.txt