Hey guys,
Inaugural post here. I’m doing something very similar to:
http://www.osronline.com/showthread.cfm?link=244071
In my driver I have registered a Load Image notification callback with
PsSetLoadImageNotifyRoutine. Within the callback I am trying to get the fully qualified name to do a file read on the specified image. I am trying to get the name by doing a ObQueryNameString on the file object in the IMAGE_INFO_EX. ObQueryNameString returns the proper name, however I am getting an IRQL_NOT_LESS_OR_EQUAL at some time AFTER returning from the callback. If I comment out the call to ObQueryNameString there is no problem.
I did take a look at http://www.osronline.com/showThread.cfm?link=186317
but the solution didn’t seem as clean as this one (if it works). I also have a hunch that I am somehow sidestepping the problem.
Bug Check info follows, lmk if code would be helpful. Any thoughts?
Thanks for the help.
Drew
*******************************************************************************
* *
* Bugcheck Analysis *
* *
*******************************************************************************
Use !analyze -v to get detailed debugging information.
BugCheck A, {fffff80002befebf, 2, 0, fffff80002905f62}
Probably caused by : ntkrnlmp.exe ( nt!RtlDispatchException+122 )
Followup: MachineOwner
nt!DbgBreakPointWithStatus:
fffff800`028d0f60 cc int 3
kd> !analyze -v
*******************************************************************************
* *
* Bugcheck Analysis *
* *
*******************************************************************************
IRQL_NOT_LESS_OR_EQUAL (a)
An attempt was made to access a pageable (or completely invalid) address at an
interrupt request level (IRQL) that is too high. This is usually
caused by drivers using improper addresses.
If a kernel debugger is available get the stack backtrace.
Arguments:
Arg1: fffff80002befebf, memory referenced
Arg2: 0000000000000002, IRQL
Arg3: 0000000000000000, bitfield :
bit 0 : value 0 = read operation, 1 = write operation
bit 3 : value 0 = not an execute operation, 1 = execute operation (only on chips which support this level of status)
Arg4: fffff80002905f62, address which referenced memory
Debugging Details:
READ_ADDRESS: fffff80002befebf
CURRENT_IRQL: 2
FAULTING_IP:
nt!RtlDispatchException+122
fffff800`02905f62 410fb60c24 movzx ecx,byte ptr [r12]
DEFAULT_BUCKET_ID: VISTA_DRIVER_FAULT
BUGCHECK_STR: 0xA
PROCESS_NAME: explorer.exe
TRAP_FRAME: fffff88005780860 – (.trap 0xfffff88005780860)
NOTE: The trap frame does not contain all registers.
Some register values may be zeroed or incorrect.
rax=fffffa8002fd90b0 rbx=0000000000000000 rcx=fffffa8002e4792b
rdx=0000000004860000 rsi=0000000000000000 rdi=0000000000000000
rip=fffff80002c1b2d5 rsp=fffff880057809f0 rbp=fffff88005780ca0
r8=fffff80002a51e80 r9=0000000000000100 r10=0000000000000080
r11=0000000000027a40 r12=0000000000000000 r13=0000000000000000
r14=0000000000000000 r15=0000000000000000
iopl=0 nv up ei ng nz na pe cy
nt! ?? ::NNGAKEGL::string'+0x2a839: fffff800
02c1b2d5 e8aaf8c6ff call nt!KiCheckForKernelApcDelivery (fffff800`0288ab84)
Resetting default scope
EXCEPTION_RECORD: fffff880057802e8 – (.exr 0xfffff880057802e8)
ExceptionAddress: fffff800028dd4d8 (nt!KiTryUnwaitThread+0x0000000000000028)
ExceptionCode: c0000005 (Access violation)
ExceptionFlags: 00000000
NumberParameters: 2
Parameter[0]: 0000000000000000
Parameter[1]: ffffffffffffffff
Attempt to read from address ffffffffffffffff
LAST_CONTROL_TRANSFER: from fffff800029ce6d2 to fffff800028d0f60
STACK_TEXT:
fffff8800577e9e8 fffff800
029ce6d2 : fffff80002befebf fffffa80
02fd9060 0000000000000065 fffff800
02917314 : nt!DbgBreakPointWithStatus
fffff8800577e9f0 fffff800
029cf4be : 0000000000000003 00000000
00000000 fffff80002913ee0 00000000
0000000a : nt!KiBugCheckDebugBreak+0x12
fffff8800577ea50 fffff800
028d9004 : fffff8800577f248 fffffa80
030b5a80 0000000000ffc000 fffff800
029566a2 : nt!KeBugCheck2+0x71e
fffff8800577f120 fffff800
028d8469 : 000000000000000a fffff800
02befebf 0000000000000002 00000000
00000000 : nt!KeBugCheckEx+0x104
fffff8800577f160 fffff800
028d70e0 : fffff8800577f298 00000000
000002bf 0000000000000000 00000000
00000100 : nt!KiBugCheckDispatch+0x69
fffff8800577f2a0 fffff800
02905f62 : fffff80002befebf fffff880
0577f478 fffff880057802e8 fffff800
02867000 : nt!KiPageFault+0x260
fffff8800577f430 fffff800
029131b5 : fffff880057802e8 fffff880
0577fb40 fffff88000000000 fffffa80
02e47900 : nt!RtlDispatchException+0x122
fffff8800577fb10 fffff800
028d8542 : fffff880057802e8 cfe8cd8b
49fff79a fffff88005780390 00000000
00000000 : nt!KiDispatchException+0x135
fffff880057801b0 fffff800
028d6e4a : 0000000000000000 00000000
00000000 0000000000000200 fffff980
07063000 : nt!KiExceptionDispatch+0xc2
fffff88005780390 fffff800
028dd4d8 : 0000000000000000 fffff980
07062c60 fffffa8002e47920 fffff800
02d7d5ec : nt!KiGeneralProtectionFault+0x10a
fffff88005780520 fffff800
02953244 : fffff9800796cc60 00000000
00000000 0000000000000000 fffffa80
02e47920 : nt!KiTryUnwaitThread+0x28
fffff88005780580 fffff800
028b592f : 8b4400001f93e990 fffff6fc
000160d9 fffff80002a64400 fffff800
00000000 : nt! ?? ::FNODOBFM::string'+0x3cb00 fffff880
05780650 fffff8000288aba9 : 00000000
00000000 0000000000000000 00000000
00000000 0000000000000000 : nt!KiDeliverApc+0x1d7 fffff880
057806d0 fffff800028f4424 : 00000000
00000000 0000000000000008 ffffffff
ffffffff 0000000000000080 : nt!KiCheckForKernelApcDelivery+0x25 fffff880
05780700 fffff800028d6fee : 00000000
00000008 fffffa8002fd9060 fffffa80
02fd9000 0000000000000000 : nt!MmAccessFault+0x1844 fffff880
05780860 fffff80002c1b2d5 : fffffa80
02e5a920 fffffa8002e5cb30 fffff880
05780b50 fffff88005780b48 : nt!KiPageFault+0x16e fffff880
057809f0 fffff80002befebf : fffff800
00000001 fffffa8002e5cb30 fffff880
05780b50 0000000000000000 : nt! ?? ::NNGAKEGL::
string’+0x2a839
fffff88005780ae0 fffff800
028d8153 : 0000000000000b48 fffffa80
02fd9060 000000000609dad8 00000000
00000b01 : nt!NtMapViewOfSection+0x2be
fffff88005780bb0 00000000
773c013a : 000007fefd5e22b1 00000000
00000000 000007fefd5ea512 00000000
0609dbf8 : nt!KiSystemServiceCopyEnd+0x13
000000000609dab8 000007fe
fd5e22b1 : 0000000000000000 000007fe
fd5ea512 000000000609dbf8 00000000
00000000 : ntdll!ZwMapViewOfSection+0xa
000000000609dac0 000007fe
fe21c56b : 0000000000000000 00000000
00000018 00000000040009e0 00000000
00000b3c : KERNELBASE!MapViewOfFile+0x8d
000000000609db40 000007fe
fe21c3c3 : 0000000000000000 00000000
00000000 0000000000000002 000007fe
fe630a00 : SHELL32!MapFileSegment+0x82
000000000609db80 000007fe
fe21c2b7 : 0000000004014100 00000000
00000000 0000000000000000 00000000
00000000 : SHELL32!GetExeTypeFromExeFile+0x11f
000000000609dc50 000007fe
fe2f9955 : 0ba00000000000fb 00000000
00000000 0000000000000000 00000000
00000000 : SHELL32!GetExeType+0x7d
000000000609dc80 000007fe
fe21dd43 : 0000000004083f00 00000000
00000000 0000000004083f00 00000000
04083f00 : SHELL32!IsCurrentProcessConsole+0x48
000000000609ded0 000007fe
fe21dc7b : 0000000000000000 00000000
00000000 0000000000000000 00000000
00000000 : SHELL32!CExecuteApplication::_CreateProcess+0xa1
000000000609df70 000007fe
fe21db97 : 0000000000000001 00000000
00000001 0000000000000000 00000000
03f05840 : SHELL32!CExecuteApplication::_TryCreateProcess+0x126
000000000609dfd0 000007fe
fe21cd5e : 0000000003eb6a48 00000000
04083f10 0000000000000000 00000000
03f05840 : SHELL32!CExecuteApplication::_DoApplication+0x198
000000000609e030 000007fe
fe232350 : 0000000000000001 00000000
00000000 0000000000000000 00000000
03f05840 : SHELL32!CExecuteApplication::Execute+0x3e
000000000609e060 000007fe
fe23221f : 0000000003eb6a48 00000000
00000000 0000000000000000 00000000
0609e230 : SHELL32!CExecuteAssociation::_DoCommand+0xb0
000000000609e0b0 000007fe
fe2340d8 : 0000000003f05850 00000000
00000000 0000000000000000 00000000
0609e230 : SHELL32!CExecuteAssociation::Execute+0xbf
000000000609e110 000007fe
fe2342df : 0000000003eb6a30 00000000
0609e230 000000000000004e 00000000
7728c296 : SHELL32!CRegDataDrivenCommand::_Invoke+0x10d
000000000609e1a0 000007fe
fe234217 : 0000000000000000 00000000
00000000 000000000609e530 00000000
00000000 : SHELL32!CRegistryVerbsContextMenu::_Execute+0x77
000000000609e200 000007fe
fe2339ee : 0000000000000000 00000000
00000000 0000000000000000 00000000
00000000 : SHELL32!CRegistryVerbsContextMenu::InvokeCommand+0x102
000000000609e4f0 000007fe
fe233886 : 0000000000000000 000007fe
fe251eda 0000000000000000 00000000
00030160 : SHELL32!HDXA_LetHandlerProcessCommandEx+0x144
000000000609e600 000007fe
fe208aad : 000000000609ecd0 00000000
029e2ee0 000000000609ecd0 00000000
00000000 : SHELL32!CDefFolderMenu::InvokeCommand+0x254
000000000609e970 000007fe
fe208909 : 0033004200320030 00390030
00330030 00000000029e2ee0 00000000
029e2ee0 : SHELL32!CShellLink::_InvokeDirect+0x204
000000000609ec90 000007fe
fe2087ff : 000000007725a808 00000000
771703a3 00000000029e2f18 00000000
00000000 : SHELL32!CShellLink::_ResolveAndInvoke+0x1de
000000000609ee30 000007fe
fe2339ee : 0000000000000000 00000000
00000000 0000000000000000 00000000
00000000 : SHELL32!CShellLink::InvokeCommand+0xe3
000000000609ef00 000007fe
fe233886 : 0000000000000000 00000000
00000000 0000000000000000 00000000
ffffffff : SHELL32!HDXA_LetHandlerProcessCommandEx+0x144
000000000609f010 000007fe
fe0be1b6 : 000000000000001f 000007fe
fe0b5027 0000000000000001 00000000
00000000 : SHELL32!CDefFolderMenu::InvokeCommand+0x254
000000000609f380 000007fe
fe0be020 : 0000000000030160 00000000
04001460 0000000000000000 00000000
00000000 : SHLWAPI!SHInvokeCommandOnContextMenu2+0x1c8
000000000609f5a0 00000000
ff1aac16 : 0000000000000000 00000000
04001460 0000000000030160 000007fe
fddb81bd : SHLWAPI!SHInvokeCommandWithFlagsAndSite+0xa0
000000000609f630 00000000
ff1a80f2 : 0000000000000000 00000000
03f59cc0 00000000004892f6 00000000
00000000 : Explorer!CTaskBand::CLauncherTask::_Launch+0x19a
000000000609f6c0 000007fe
fe0ac8ea : 0000000000000000 00000000
00000000 0000000000000000 00000000
00000000 : Explorer!CTaskBand::CLauncherTask::s_ThreadProc+0x12
000000000609f6f0 00000000
7716f56d : 0000000000000000 00000000
00000000 0000000000000000 00000000
00000000 : SHLWAPI!WrapperThreadProc+0x19b
000000000609f7f0 00000000
773a3281 : 0000000000000000 00000000
00000000 0000000000000000 00000000
00000000 : kernel32!BaseThreadInitThunk+0xd
000000000609f820 00000000
00000000 : 0000000000000000 00000000
00000000 0000000000000000 00000000
00000000 : ntdll!RtlUserThreadStart+0x1d
STACK_COMMAND: kb
FOLLOWUP_IP:
nt!RtlDispatchException+122
fffff800`02905f62 410fb60c24 movzx ecx,byte ptr [r12]
SYMBOL_STACK_INDEX: 6
SYMBOL_NAME: nt!RtlDispatchException+122
FOLLOWUP_NAME: MachineOwner
MODULE_NAME: nt
IMAGE_NAME: ntkrnlmp.exe
DEBUG_FLR_IMAGE_TIMESTAMP: 4a5bc600
FAILURE_BUCKET_ID: X64_0xA_VRF_nt!RtlDispatchException+122
BUCKET_ID: X64_0xA_VRF_nt!RtlDispatchException+122