Hello
I’m using IoGetDeviceObjectPointer to find a driver pointer by enumerating the device directory: Ex: searching \Driver\atapi
status = IoGetDeviceObjectPointer(&device_name, FILE_READ_DATA, &pFile, &pDev); <– Crash here
if ( !NT_SUCCESS( status ) || pDev == NULL || pDev->DriverObject == NULL )
goto next;
if ( pFile ) ObDereferenceObject( pFile );
//Pseudo code here
PDRIVER_OBJECT pDrv = pDev->DriverObject;
if ( pDrv->DriverName == L" \Driver\atapi") return pDrv;
Here’s the call stack:
It look like the IoGetDeviceObjectPointer is calling a USBSTOR driver, that crashed.
Minidump can be found here: https://trello-attachments.s3.amazonaws.com/52dfc2009f4fb4ad1fd6d6a5/541313380d7c6bf6a735bfdd/b7cbe5749a1deb19279ce07605c9936b/Mini091214-01.dmp
TrueSight is my driver.
b8509004 806ea5f3 8ac553f4 8b14805c 80546bec nt!KeInsertDeviceQueue+0x8
b8509028 804eef4c 8ac553d0 8b14805c 00000001 hal!HalAllocateAdapterChannel+0x31
b8509040 b66256a3 8ac553d0 8b148028 00000001 nt!IoAllocateAdapterChannel+0x2a
b8509084 b662649d 8b148028 8aa45880 80546bec USBPORT!USBPORT_FlushMapTransferList+0x1b1
b85090e0 b662738a 02eecdb0 ffffffff 80546bec USBPORT!USBPORT_FlushPendingList+0x5b1
b8509110 b662e334 8ae9eab8 b8509148 b662def8 USBPORT!USBPORT_QueueTransferUrb+0x248
b850911c b662def8 8b148028 8aa45880 8aea5434 USBPORT!USBPORT_AsyncTransfer+0x30
b8509148 b6633106 8ac01030 8b148028 00000090 USBPORT!USBPORT_ProcessURB+0x3f4
b8509168 b661c3b2 8ac01030 8aa45880 8aa45880 USBPORT!USBPORT_PdoInternalDeviceControlIrp+0x7e
b850918c 804ef1f9 8aa4595c 8ac01188 8aea5434 USBPORT!USBPORT_Dispatch+0x148
b850919c b714859c b85091c4 b714c82d 8aa45880 nt!IopfCallDriver+0x31
b85091a4 b714c82d 8aa45880 8ac01030 8aa45880 usbhub!USBH_PassIrp+0x18
b85091c4 b714d0ae 8ac64d50 8aa45880 8aa45880 usbhub!USBH_PdoUrbFilter+0xbd
b85091e0 b714a5e4 8aea5434 8aa45880 b8509214 usbhub!USBH_PdoDispatch+0x202
b85091f0 804ef1f9 8b090318 8aa45880 8aea5398 usbhub!USBH_HubDispatch+0x48
b8509200 b840070c 8aea54b7 8b09bb9c 8b09bb0a nt!IopfCallDriver+0x31
b8509214 b840165f 8aea52e0 8aa45880 8b1e0f14 USBSTOR!USBSTOR_IssueBulkOrInterruptRequest+0x9c
b850924c b8402061 8aea52e0 8aa45880 8aea52e0 USBSTOR!USBSTOR_CbwTransfer+0x79
b8509274 804f0277 8aea52e0 00a45880 8b0a4f58 USBSTOR!USBSTOR_StartIo+0x13b
b8509294 b8400aee 8aea52e0 8aa45880 8b09bb88 nt!IoStartPacket+0x7d
b85092b8 804ef1f9 8b0a4ea0 8aa45880 8b09bab0 USBSTOR!USBSTOR_Scsi+0x108
b85092c8 b8108fdd 804fa218 8abe4430 00000000 nt!IopfCallDriver+0x31
b85092dc b810a7ed 8b09bab0 8abe4378 8ab22200 CLASSPNP!SubmitTransferPacket+0x82
b850938c b80fa02b 8abe4378 8ab220e8 b85093b8 CLASSPNP!ClassReadDriveCapacity+0xa2
b850939c b80fbc33 8abe4378 00070407 8ab220e8 disk!DiskReadDriveCapacity+0x25
b85093b8 b80f8af7 8abe46f8 89af7b90 89af7b90 disk!DiskIoctlGetPartitionInfo+0x39
b850944c b81093ed 8ab22030 89af7b90 00000000 disk!DiskDeviceControl+0x4c3
b8509468 804ef1f9 8ab22030 89af7b90 00000000 CLASSPNP!ClassDeviceControlDispatch+0x48
b8509478 b2c8f83e b2ce7eb0 b8049400 00000000 nt!IopfCallDriver+0x31
WARNING: Stack unwind information not available. Following frames may be wrong.
b850949c b2c8bb9e 8ab22030 00074004 00000000 sonypvt3+0xc83e
b850a37c b2c90ed0 b2ce7eb0 b850a410 b850a414 sonypvt3+0x8b9e
b850a3a0 b2c85c3a b2ce7eb0 b850a410 b850a414 sonypvt3+0xded0
b850a448 b2c85ba4 8a8dffd8 8963e500 b2c85520 sonypvt3+0x2c3a
b850a484 804ef1f9 8b043168 8963e500 8963e6ac sonypvt3+0x2ba4
b850a4d0 805359ab 00000000 89a78b10 8b11305c nt!IopfCallDriver+0x31
b850a4f0 b78922bf b7892189 00000000 8978a8c8 nt!ExReleaseResourceLite+0x8d
b850a4f4 b7892189 00000000 8978a8c8 8963e500 fltmgr!FltpPerformPreMountCallbacks+0x227
b850a560 8963e500 8963e6d0 b78963a8 8af313c8 fltmgr!FltpPerformPreMountCallbacks+0xf1
b850a5dc b78967ba 8af313c8 8963e500 8ab22030 0x8963e500
b850a60c 804ef1f9 8af313c8 8963e500 8963e500 fltmgr!FltpFsControl+0x5a
b850a61c 80581bff 00000000 8ab22030 806e7a4c nt!IopfCallDriver+0x31
b850a66c 804f5452 c0000013 88ee2901 00000000 nt!IopMountVolume+0x1b9
b850a69c 80582bf8 88ee29b0 8ab22030 b850a7d0 nt!IopCheckVpbMounted+0x5e
b850a78c 805bf4bc 8ab22030 00000000 8a071618 nt!IopParseDevice+0x3d8
b850a804 805bba48 00000000 b850a844 00000240 nt!ObpLookupObjectName+0x53c
b850a858 80576051 00000000 00000000 50a91800 nt!ObOpenObjectByName+0xea
b850a8d4 805769c8 b850aa50 00000001 b850aa28 nt!IopCreateFile+0x407
b850a930 8057a1c7 b850aa50 00000001 b850aa28 nt!IoCreateFile+0x8e
b850a970 805417e8 b850aa50 00000001 b850aa28 nt!NtOpenFile+0x27
b850a970 805006a9 b850aa50 00000001 b850aa28 nt!KiSystemServicePostCall
b850aa00 80576200 b850aa50 00000001 b850aa28 nt!ZwOpenFile+0x11
b850aa48 b21374b5 b850ae64 00000001 b850b270 nt!IoGetDeviceObjectPointer+0x40
b850b33c b2137444 b2139bd0 b850b75c 00000001 TrueSight!GetDriverByDeviceDirectory+0x2e5 [c:\tools\drvutils\device.cpp @ 381]
b850bc2c b21371a6 b2139bd0 b2139cb0 00000000 TrueSight!GetDriverByDeviceDirectory+0x274 [c:\tools\drvutils\device.cpp @ 366]
b850bc44 b2135922 b2139bd0 b850bc5c b213588a TrueSight!GetDriverByDriverName+0x16 [c:\tools\drvutils\device.cpp @ 302]
b850bc50 b213588a b213a3a4 b850bc84 b213a58f TrueSight!InitDevicesData+0x52 [c:\tools\roguekillerv8\driver\driver\core.cpp @ 34]
b850bc5c b213a58f b213a380 0000001c 00000000 TrueSight!InitData+0x1a [c:\tools\roguekillerv8\driver\driver\core.cpp @ 18]
b850bc84 805813af 89ed9468 88a15000 00000000 TrueSight!DriverEntry+0xff [c:\tools\roguekillerv8\driver\driver\driver.cpp @ 64]
b850bd54 805814bf 80001944 00000001 00000000 nt!IopLoadDriver+0x66d
b850bd7c 80538923 80001944 00000000 8b674b20 nt!IopLoadUnloadDriver+0x45
b850bdac 805cffee ae417bb8 00000000 00000000 nt!ExpWorkerThread+0xef
b850bddc 8054620e 80538834 00000001 00000000 nt!PspSystemThreadStartup+0x34
00000000 00000000 00000000 00000000 00000000 nt!KiThreadStartup+0x16