Thanks for your response. This is running at PASSIVE_LEVEL, it is a pre
operation callback and it is not supposed to be called at higher IRQL
according to the new WDK documentation. Also, I am using the PAGED_CODE in
this path to be sure of lower IRQL. The bugcheck shows an IRQL of 2 but this
is the responsability of FltGetFileNameInformation.
I put a breakpoint on line 551, just before the exception occurs. Accessing
the members of Data in the debugger sometimes gives access violations, but
not this time. The fields seem to contain arbitrary values.
Regards,
/Daniel
kd> ??Data
struct _FLT_CALLBACK_DATA * 0xfffffadfe90cb6e8 +0x000 Flags : 2 +0x008 Thread : 0xfffffadf
e855e810 _KTHREAD
+0x010 Iopb : 0xfffffadfe90cb740 _FLT_IO_PARAMETER_BLOCK +0x018 IoStatus : _IO_STATUS_BLOCK +0x028 TagData : (null) +0x030 QueueLinks : _LIST_ENTRY [0x00000000
00000000 - 0x0]
+0x040 QueueContext : [2] (null)
+0x030 FilterContext : [4] (null)
+0x050 RequestorMode : 0 ‘’
kd> ??Data->Iopb
struct _FLT_IO_PARAMETER_BLOCK * 0xfffffadf`e90cb740
+0x000 IrpFlags : 0
+0x004 MajorFunction : 0 ‘’
+0x005 MinorFunction : 0 ‘’
+0x006 OperationFlags : 0 ‘’
+0x007 Reserved : 0 ‘’
+0x008 TargetFileObject : (null)
+0x010 TargetInstance : (null)
+0x018 Parameters : _FLT_PARAMETERS
kd> !irql
Debugger saved IRQL for processor 0x0 – 0 (LOW_LEVEL)
kd> g
Access violation - code c0000005 (!!! second chance !!!)
fltMgr!FltGetFileNameInformation+0xa0:
fffffadf`e59a5ae0 48837f1800 cmp qword ptr [rdi+18h],0
kd> gn
*** Fatal System Error: 0x0000001e
(0xFFFFFFFFC0000005,0xFFFFFADFE59A5AE0,0x0000000000000000,0x0000000000000018)
Break instruction exception - code 80000003 (first chance)
A fatal system error has occurred.
Debugger entered on first try; Bugcheck callbacks have not been invoked.
A fatal system error has occurred.
Connected to Windows Server 2003 3790 x64 target, ptr64 TRUE
Loading Kernel Symbols
…
Loading User Symbols
…
Loading unloaded module list
…
Loading Wow64 Symbols
…
*******************************************************************************
*
*
* Bugcheck Analysis
*
*
*
*******************************************************************************
Use !analyze -v to get detailed debugging information.
BugCheck 1E, {ffffffffc0000005, fffffadfe59a5ae0, 0, 18}
*** ERROR: Symbol file could not be found. Defaulted to export symbols for
win32k.sys -
Probably caused by : rspmmfs64.sys ( rspmmfs64!LogFS+3e )
Followup: MachineOwner
nt!RtlpBreakWithStatusInstruction:
fffff800`0103a240 cc int 3
kd> !analyze -v
*******************************************************************************
*
*
* Bugcheck Analysis
*
*
*
*******************************************************************************
KMODE_EXCEPTION_NOT_HANDLED (1e)
This is a very common bugcheck. Usually the exception address pinpoints
the driver/function that caused the problem. Always note this address
as well as the link date of the driver/image that contains this address.
Arguments:
Arg1: ffffffffc0000005, The exception code that was not handled
Arg2: fffffadfe59a5ae0, The address that the exception occurred at
Arg3: 0000000000000000, Parameter 0 of the exception
Arg4: 0000000000000018, Parameter 1 of the exception
Debugging Details:
EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at “0x%08lx”
referenced memory at “0x%08lx”. The memory could not be “%s”.
FAULTING_IP:
fltMgr!FltGetFileNameInformation+a0
fffffadf`e59a5ae0 48837f1800 cmp qword ptr [rdi+18h],0
EXCEPTION_PARAMETER1: 0000000000000000
EXCEPTION_PARAMETER2: 0000000000000018
READ_ADDRESS: 0000000000000018
DEFAULT_BUCKET_ID: DRIVER_FAULT
BUGCHECK_STR: 0x1E
PROCESS_NAME: mm.exe
CURRENT_IRQL: 2
EXCEPTION_RECORD: fffffadfe22c05f0 – (.exr fffffadfe22c05f0)
ExceptionAddress: fffffadfe59a5ae0
(fltMgr!FltGetFileNameInformation+0x00000000000000a0)
ExceptionCode: c0000005 (Access violation)
ExceptionFlags: 00000000
NumberParameters: 2
Parameter[0]: 0000000000000000
Parameter[1]: 0000000000000018
Attempt to read from address 0000000000000018
TRAP_FRAME: fffffadfe22c0680 – (.trap fffffadfe22c0680)
NOTE: The trap frame does not contain all registers.
Some register values may be zeroed.
rax=0000000000000000 rbx=0000000000000000 rcx=fffffadfe90cb740
rdx=0000000000000102 rsi=0000000000000000 rdi=0000000000000000
rip=fffffadfe59a5ae0 rsp=fffffadfe22c0810 rbp=0000000000000003
r8=fffffadfe22c0910 r9=0000000000000000 r10=fffffadfe9106048
r11=0000000000000000 r12=0000000000000000 r13=0000000000000000
r14=0000000000000000 r15=0000000000000000
iopl=0 nv up ei pl zr na po nc
fltMgr!FltGetFileNameInformation+0xa0:
fffffadfe59a5ae0 48837f1800 cmp qword ptr [rdi+18h],0 ds:00000000
00000018=???
Resetting default scope
LAST_CONTROL_TRANSFER: from fffff800010d72be to fffff8000103a240
STACK_TEXT:
fffffadfe22bf818 fffff800
010d72be : ffffffffc0000005 00000000
00000000
000000000000001e fffff800
01059abe : nt!RtlpBreakWithStatusInstruction
fffffadfe22bf820 fffff800
010d8a4d : fffff80000000003 00000000
0000001e
ffffffffc0000005 fffffadf
e59a5ae0 : nt!KiBugCheckDebugBreak+0x1e
fffffadfe22bf880 fffff800
01041a14 : 0000000048000000 fffffadf
e22c0901
fffffadfe9106001 00000000
00000000 : nt!KeBugCheck2+0x6fd
fffffadfe22bfec0 fffff800
0109a361 : 000000000000001e ffffffff
c0000005
fffffadfe59a5ae0 00000000
00000000 : nt!KeBugCheckEx+0x104
fffffadfe22bff00 fffff800
0104172f : fffffadfe22c05f0 fffff800
012c955d
fffffadfe22c0680 00000000
00000200 : nt!KiDispatchException+0x128
fffffadfe22c0500 fffff800
01040621 : 0000000080000004 00000000
00000000
fffffadfe59a5a00 00000000
00000000 : nt!KiExceptionExit
fffffadfe22c0680 fffffadf
e59a5ae0 : 0000000000000000 00000000
00000000
0000000000000000 00000000
00000000 : nt!KiPageFault+0x1e1
fffffadfe22c0810 fffffadf
e240476e : fffffadfe8a47400 fffffadf
e93da4a0
fffffadfe90cb640 fffffadf
e90cb6e8 : fltMgr!FltGetFileNameInformation+0xa0
fffffadfe22c08b0 fffffadf
e2404b07 : fffffadfe90cb6e8 fffffadf
e8a19dae
fffffadfe8a19dae fffffadf
e93da4a0 : rspmmfs64!LogFS+0x3e
[s:\mm\mmpsy\fs\rspmmfs.c @ 551]
fffffadfe22c0950 fffffadf
e59b6e67 : fffffadfe90cb6e8 fffffadf
e22c0a10
fffffadfe22c0a00 fffffadf
e90cb6e8 : rspmmfs64!SpyPreOperationCallback+0xa7
[s:\mm\mmpsy\fs\rspmmfs.c @ 887]
fffffadfe22c09b0 fffffadf
e59bd666 : 0000000000000000 fffffadf
e93d6190
fffffadfe9307240 fffffadf
e8a97650 :
fltMgr!FltpPerformPreMountCallbacks+0x2a7
fffffadfe22c0a60 fffffadf
e59bdee0 : fffffadfe8a97650 00000000
0000000d
fffffadfe93d6040 fffffadf
e93da450 : fltMgr!FltpFsControlMountVolume+0x1e6
fffffadfe22c0b20 fffff800
01013628 : fffffadfe93d6040 fffffadf
e93da4a0
fffffadfe93d6040 fffffadf
e8a97650 : fltMgr!FltpFsControl+0x80
fffffadfe22c0b80 fffff800
012b9fcf : fffffadfe22c11e0 fffffadf
e90ed490
fffffadfe22c0f20 fffffadf
e22c0d74 : nt!IopCheckVpbMounted+0x334
fffffadfe22c0cf0 fffff800
012b345e : fffffadfe90ed490 fffffadf
e90ed440
fffffadfe22c1020 00000000
00000000 : nt!IopParseDevice+0x735
fffffadfe22c0ea0 fffff800
012b983a : 0000000000000000 fffffadf
e22c1010
0000000000000240 00000000
00000000 : nt!ObpLookupObjectName+0x92c
fffffadfe22c0fb0 fffff800
012c13c9 : 0000000000000000 00000000
00000000
0000000000000000 00000000
00000000 : nt!ObOpenObjectByName+0x180
fffffadfe22c11a0 fffff800
012c1577 : fffffadfe93ce4c0 00000000
00000000
0000000000000000 fffff800
012b3cb6 : nt!IopCreateFile+0x62f
fffffadfe22c1330 fffff800
012c3d89 : 0000000000000000 fffff800
01047a0c
0000000000120100 fffff800
0104f7c7 : nt!IoCreateFile+0x12f
fffffadfe22c1410 fffff800
01041422 : fffffadf00000000 fffff780
00000000
fffffadfe22c1580 fffffadf
e22c14e4 : nt!NtCreateFile+0x69
fffffadfe22c1490 fffff800
01041880 : fffffadfe59b82fe 00000000
00000000
fffffadfe8697c20 00000000
00f8000c : nt!KiSystemServiceCopyEnd+0x3
fffffadfe22c1698 fffffadf
e59b82fe : 0000000000000000 fffffadf
e8697c20
0000000000f8000c fffffa80
01dedb48 : nt!KiServiceLinkage
fffffadfe22c16a0 fffffadf
e59b71ad : 0000000000000000 fffffadf
e86c5010
fffffadfe86c5010 00000000
00000000 : fltMgr!FltpGetVolumeFromName+0xde
fffffadfe22c1870 fffffadf
e59bcd21 : fffffadfe8a47400 fffffadf
e89e5f40
fffffadf00000000 00000000
00000001 : fltMgr!FltpAttachVolume+0x22d
fffffadfe22c1950 fffffadf
e59a1ab2 : 0000000000000000 00000000
00000000
00000000000000ec fffffadf
e8e11d90 : fltMgr!FltpCommonDeviceControl+0x1a1
fffffadfe22c1990 fffffadf
e59a27c2 : fffffadfe8e11d90 fffffadf
e22c1cf0
0000000000000000 fffffadf
e90a8c20 : fltMgr!FltpControlDispatch+0xe2
fffffadfe22c1a10 fffff800
012cdd2f : 000000000000003e fffffadf
e22c1cf0
0000000000000001 fffffadf
e89e5f40 : fltMgr!FltpDispatch+0x22
fffffadfe22c1a70 fffff800
012de406 : 00000000000000f0 00000000
00000000
0000000000000000 00000000
00000000 : nt!IopXxxControlFile+0xa4c
fffffadfe22c1b90 fffff800
01041422 : fffffadfe8697c20 fffffadf
e855e810
0000000000000000 00000000
00000000 : nt!NtDeviceIoControlFile+0x56
fffffadfe22c1c00 00000000
78b83e48 : fffffadfe22c1c70 00000000
0012edb8
0000000200000030 00000000
78b842d9 : nt!KiSystemServiceCopyEnd+0x3
000000000012ed78 00000000
78be6a5a : 000000007efdf000 00000000
00000001
0000000000000000 00000000
7efdf000 : wow64cpu!DeviceIoctlFileFault+0x35
000000000012ee60 00000000
78be5e0d : 0000000000000000 00000000
0012f1a0
000000000012fab0 00000000
00000000 : wow64!RunCpuSimulation+0xa
000000000012ee90 00000000
78ed8501 : 000000000012f700 00000000
00000000
000000000012fab0 00000000
00000003 : wow64!Wow64LdrpInitialize+0x2ed
000000000012f6c0 00000000
78ed6416 : 0000000000000000 00000000
00000000
0000000000000000 00000000
00000000 : ntdll!LdrpInitializeProcess+0x17d9
000000000012f9d0 00000000
78ef3925 : 0000000000000000 00000000
00000000
0000000000000000 00000000
00000000 : ntdll!LdrpInitialize+0x18f
000000000012fab0 00000000
78d59630 : 0000000000000000 00000000
00000000
0000000000000000 00000000
00000000 : ntdll!KiUserApcDispatch+0x15
000000000012ffa8 00000000
00000000 : 0000000000000000 00000000
00000000
0000000000000000 00000000
00000000 : 0x78d59630
000000000012ffb0 00000000
00000000 : 0000000000000000 00000000
00000000
0000000000000000 00000000
00000000 : 0x0
000000000012ffb8 00000000
00000000 : 0000000000000000 00000000
00000000
0000000000000000 00000000
00000000 : 0x0
000000000012ffc0 00000000
00000000 : 0000000000000000 00000000
00000000
0000000000000000 00000000
00000000 : 0x0
000000000012ffc8 00000000
00000000 : 0000000000000000 00000000
00000000
0000000000000000 00000000
00000000 : 0x0
000000000012ffd0 00000000
00000000 : 0000000000000000 00000000
00000000
0000000000000000 00000000
00000000 : 0x0
000000000012ffd8 00000000
00000000 : 0000000000000000 00000000
00000000
0000000000000000 00000000
00000000 : 0x0
000000000012ffe0 00000000
00000000 : 0000000000000000 00000000
00000000
0000000000000000 00000020
78746341 : 0x0
000000000012ffe8 00000000
00000000 : 0000000000000000 00000000
00000000
0000002078746341 00005370
00000001 : 0x0
000000000012fff0 00000000
00000000 : 0000000000000000 00000020
78746341
0000537000000001 00000000
00000124 : 0x0
000000000012fff8 00000000
00000000 : 0000002078746341 00005370
00000001
0000000000000124 00000000
00000020 : 0x0
0000000000130000 00000020
78746341 : 0000537000000001 00000000
00000124
0000000000000020 00000001
00000014 : 0x0
0000000000130008 00005370
00000001 : 0000000000000124 00000000
00000020
0000000100000014 00000034
0000000a : 0x2078746341 00000000
00130010 0000000000000124 : 00000000
00000020 0000000100000014 00000034
0000000a 00000001000001b4 : 0x5370
00000001
0000000000130018 00000000
00000020 : 0000000100000014 00000034
0000000a
00000001000001b4 00000000
00000000 : 0x124
0000000000130020 00000001
00000014 : 000000340000000a 00000001
000001b4
0000000000000000 00000000
00000000 : 0x20
0000000000130028 00000034
0000000a : 00000001000001b4 00000000
00000000
0000000000000000 00000002
00000000 : 0x100000014 00000000
00130030 00000001000001b4 : 00000000
00000000 0000000000000000 00000002
00000000 0000000000000000 : 0x34
0000000a
0000000000130038 00000000
00000000 : 0000000000000000 00000002
00000000
0000000000000000 00000314
00000000 : 0x1000001b4 00000000
00130040 0000000000000000 : 00000002
00000000 0000000000000000 00000314
00000000 000000000000019c : 0x0 00000000
00130048 0000000200000000 : 00000000
00000000 0000031400000000 00000000
0000019c 000004b02d59495b : 0x0 00000000
00130050 0000000000000000 : 00000314
00000000 000000000000019c 000004b0
2d59495b 000004e400000032 : 0x2
00000000
0000000000130058 00000314
00000000 : 000000000000019c 000004b0
2d59495b
000004e400000032 00000000
000002d2 : 0x0
0000000000130060 00000000
0000019c : 000004b02d59495b 000004e4
00000032
00000000000002d2 000007b8
f33271ba : 0x31400000000 00000000
00130068 000004b02d59495b : 000004e4
00000032 00000000000002d2 000007b8
f33271ba 000008040000004a : 0x19c 00000000
00130070 000004e400000032 : 00000000
000002d2 000007b8f33271ba 00000804
0000004a 000000000000031a : 0x4b0
2d59495b
0000000000130078 00000000
000002d2 : 000007b8f33271ba 00000804
0000004a
000000000000031a 00000b20
32ceeacd : 0x4e400000032 00000000
00130080 000007b8f33271ba : 00000804
0000004a 000000000000031a 00000b20
32ceeacd 00000b6400000042 : 0x2d2 00000000
00130088 000008040000004a : 00000000
0000031a 00000b2032ceeacd 00000b64
00000042 0000000000000308 : 0x7b8
f33271ba
0000000000130090 00000000
0000031a : 00000b2032ceeacd 00000b64
00000042
0000000000000308 00000e6c
e23ce879 : 0x8040000004a 00000000
00130098 00000b2032ceeacd : 00000b64
00000042 0000000000000308 00000e6c
e23ce879 00000ea000000032 : 0x31a 00000000
001300a0 00000b6400000042 : 00000000
00000308 00000e6ce23ce879 00000ea0
00000032 00000000000002d2 : 0xb20
32ceeacd
00000000001300a8 00000000
00000308 : 00000e6ce23ce879 00000ea0
00000032
00000000000002d2 00001174
830202e4 : 0xb6400000042 00000000
001300b0 00000e6ce23ce879 : 00000ea0
00000032 00000000000002d2 00001174
830202e4 000011bc00000046 : 0x308 00000000
001300b8 00000ea000000032 : 00000000
000002d2 00001174830202e4 000011bc
00000046 00000000000002fc : 0xe6c
e23ce879
00000000001300c0 00000000
000002d2 : 00001174830202e4 000011bc
00000046
00000000000002fc 000014b8
d18cd5d2 : 0xea000000032 00000000
001300c8 00001174830202e4 : 000011bc
00000046 00000000000002fc 000014b8
d18cd5d2 0000150000000046 : 0x2d2 00000000
001300d0 000011bc00000046 : 00000000
000002fc 000014b8d18cd5d2 00001500
00000046 00000000000002fc : 0x1174
830202e4
00000000001300d8 00000000
000002fc : 000014b8d18cd5d2 00001500
00000046
00000000000002fc 000017fc
38505fc8 : 0x11bc`00000046
STACK_COMMAND: kb
FOLLOWUP_IP:
rspmmfs64!LogFS+3e [s:\mm\mmpsy\fs\rspmmfs.c @ 551]
fffffadf`e240476e 85c0 test eax,eax
FAULTING_SOURCE_CODE:
547:
548: if (!Data) return;
549:
550:
551: if (!NT_SUCCESS(FltGetFileNameInformation( Data,
FLT_FILE_NAME_OPENED | FLT_FILE_NAME_QUERY_DEFAULT, &nameInfo )))
552: {
553: return;
554: }
555:
556:
SYMBOL_STACK_INDEX: 8
FOLLOWUP_NAME: MachineOwner
MODULE_NAME: rspmmfs64
IMAGE_NAME: rspmmfs64.sys
DEBUG_FLR_IMAGE_TIMESTAMP: 456aed7f
SYMBOL_NAME: rspmmfs64!LogFS+3e
FAILURE_BUCKET_ID: X64_0x1E_rspmmfs64!LogFS+3e
BUCKET_ID: X64_0x1E_rspmmfs64!LogFS+3e
Followup: MachineOwner
“frank” wrote in message news:xxxxx@ntfsd…
> Daniel, provide a bit more information:
>
> Which fields of CALLBACK_DATA do you acess? What is happening in line 691?
> Post the output of “analyze -v”.
>
> The pointer to CALLBACK_DATA seems to be ok. Perhaps you are at raised
> IRQL during access.
>
> By the way: why do you find the “Data”-parameter to be bogus?
>
>
>
>
> “Daniel Terhell” schrieb im Newsbeitrag
> news:xxxxx@ntfsd…
>> Forgive me for posting this basic question, the answer is probably
>> something simple. I got a minifilter which is working fine except when I
>> call FilterAttach from my application it causes the preoperation callback
>> to be called and accessing the fields in the Data parameter then cause
>> access violations. The question is how can I detect this inside my
>> preoperation callback (since the Data parameter is bogus) or better how
>> can I prevent this from getting called ? My filter does not register an
>> InstanceSetupCallback.
>>
>> Here is the stack (running on Windows Xp x64 edition):
>>
>> kd> kp