Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-19696

IOCTL_STORAGE_QUERY_PROPERTY StorageAccessAlignmentProperty BSOD 0x19

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Critical
    • None
    • Drivers: Storage

    Description

      IOCTL_STORAGE_QUERY_PROPERTY StorageAccessAlignmentProperty PropertyStandardQuery causes BSOD.

      int __cdecl main()
      {
          typedef enum {
              StorageAccessAlignmentProperty = 6,
              ioctl_storage_query_property = CTL_CODE(45, 0x0500, METHOD_BUFFERED, FILE_ANY_ACCESS)
          } STORAGE_PROPERTY_ID;
          typedef enum { PropertyStandardQuery = 0, PropertyExistsQuery = 1, PropertyMaskQuery = 2, PropertyQueryMaxDefined = 3 } STORAGE_QUERY_TYPE;
          typedef struct { STORAGE_PROPERTY_ID PropertyId; STORAGE_QUERY_TYPE QueryType; BYTE AdditionalParameters[1]; } STORAGE_PROPERTY_QUERY;
          typedef struct _STORAGE_ACCESS_ALIGNMENT_DESCRIPTOR { UINT Version, Size, BytesPerCacheLine, BytesOffsetForCacheAlignment, BytesPerLogicalSector, BytesPerPhysicalSector, BytesOffsetForSectorAlignment; } STORAGE_ACCESS_ALIGNMENT_DESCRIPTOR;
       
          CHAR vol[] = "\\\\.\\A:", win[MAX_PATH];
          GetWindowsDirectoryA(win, MAX_PATH);
          vol[4] = win[0];
          HANDLE hVolume = CreateFileA(vol, 0, 7, NULL, OPEN_EXISTING, 0, 0);
          if (hVolume != INVALID_HANDLE_VALUE)
          {
              STORAGE_PROPERTY_QUERY query = { StorageAccessAlignmentProperty, PropertyStandardQuery };
              STORAGE_ACCESS_ALIGNMENT_DESCRIPTOR alignment = { 0 };
              DWORD output = 0;
              BOOL succ = DeviceIoControl(hVolume, ioctl_storage_query_property, &query, sizeof(query), &alignment, sizeof(alignment), &output, NULL);
              printf("%d %d %d\n", succ, output, alignment.BytesPerPhysicalSector); // Windows: "1 28 4096"
              CloseHandle(hVolume);
          }
          return 0;
      }
      

       
      (ntoskrnl/mm/ARM3/expool.c:284) Entry BlockSize 5, tag ScC4. NextEntry PreviousSize 0, tag RMAP
       
      *** Fatal System Error: 0x00000019
                             (0x00000005,0xB421A900,0x00000120,0xB421A8D8)
      

      20240720-0.4.15-dev-8415-g39077a7.GNU_8.4.0 on FAT32 (VirtualBox)

      Attachments

        Activity

          People

            Unassigned Unassigned
            whindsaks whindsaks
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: