Apologies, yes, the signing was done last
The driver has been around for 4 years, and has been part of quite a few releases to customers now. I’ve been working on it for most of that time. The driver presently works great on all versions of Windows Vista/7/8/10 except Windows 10 enterprise with the new “virtualization-based isolation for Code Integrity”. As soon as I turn that on it falls over, seemingly while loading the driver.
Yes, I did do an !analyze -v of course but it was less helpful than usual simply stating that there’s been an access violation in the very first instruction in GsDriverEntry.
Here is the full output of !analyze -v as requested. (Including a !dh of my driver just to prove I don’t have any writable/executable sections) Thanks for all your help!
0: kd> !analyze -v
*******************************************************************************
* *
* Bugcheck Analysis *
* *
*******************************************************************************
SYSTEM_THREAD_EXCEPTION_NOT_HANDLED (7e)
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: fffff8005c0263ac, The address that the exception occurred at
Arg3: ffffd00020e91728, Exception Record Address
Arg4: ffffd00020e90f40, Context Record Address
Debugging Details:
EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s.
FAULTING_IP:
DataNow_Driver!GsDriverEntry+0 [d:\th\minkernel\tools\gs_support\kmode\gs_support.c @ 113]
fffff800`5c0263ac 48895c2408 mov qword ptr [rsp+8],rbx
EXCEPTION_RECORD: ffffd00020e91728 – (.exr 0xffffd00020e91728)
ExceptionAddress: fffff8005c0263ac (DataNow_Driver!GsDriverEntry)
ExceptionCode: c0000005 (Access violation)
ExceptionFlags: 00000000
NumberParameters: 2
Parameter[0]: 0000000000000000
Parameter[1]: ffffffffffffffff
Attempt to read from address ffffffffffffffff
CONTEXT: ffffd00020e90f40 – (.cxr 0xffffd00020e90f40;r)
rax=0000000000000000 rbx=0000000000000000 rcx=ffffe001765671f0
rdx=ffffe00196625000 rsi=ffffe001765671f0 rdi=0000000000000000
rip=fffff8005c0263ac rsp=ffffd00020e91968 rbp=ffffd00020e91a70
r8=0400000000020020 r9=fffff801bfcb3c40 r10=00000000000001c8
r11=ffffd00020e91960 r12=ffffffff8000139c r13=0000000000000200
r14=ffffe00196625000 r15=0000000020206f49
iopl=0 nv up ei pl zr na po nc
cs=0010 ss=0018 ds=002b es=002b fs=0053 gs=002b efl=00010246
DataNow_Driver!GsDriverEntry:
fffff8005c0263ac 48895c2408 mov qword ptr [rsp+8],rbx ss:0018:ffffd000
20e91970=0000000000000000
Last set context:
rax=0000000000000000 rbx=0000000000000000 rcx=ffffe001765671f0
rdx=ffffe00196625000 rsi=ffffe001765671f0 rdi=0000000000000000
rip=fffff8005c0263ac rsp=ffffd00020e91968 rbp=ffffd00020e91a70
r8=0400000000020020 r9=fffff801bfcb3c40 r10=00000000000001c8
r11=ffffd00020e91960 r12=ffffffff8000139c r13=0000000000000200
r14=ffffe00196625000 r15=0000000020206f49
iopl=0 nv up ei pl zr na po nc
cs=0010 ss=0018 ds=002b es=002b fs=0053 gs=002b efl=00010246
DataNow_Driver!GsDriverEntry:
fffff8005c0263ac 48895c2408 mov qword ptr [rsp+8],rbx ss:0018:ffffd000
20e91970=0000000000000000
Resetting default scope
DEFAULT_BUCKET_ID: WIN8_DRIVER_FAULT
PROCESS_NAME: System
CURRENT_IRQL: 0
ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s.
EXCEPTION_PARAMETER1: 0000000000000000
EXCEPTION_PARAMETER2: ffffffffffffffff
READ_ADDRESS: unable to get nt!MmSpecialPoolStart
unable to get nt!MmSpecialPoolEnd
unable to get nt!MmPagedPoolEnd
unable to get nt!MmNonPagedPoolStart
unable to get nt!MmSizeOfNonPagedPoolInBytes
ffffffffffffffff
FOLLOWUP_IP:
DataNow_Driver!GsDriverEntry+0 [d:\th\minkernel\tools\gs_support\kmode\gs_support.c @ 113]
fffff800`5c0263ac 48895c2408 mov qword ptr [rsp+8],rbx
BUGCHECK_STR: AV
ANALYSIS_VERSION: 6.3.9600.17336 (debuggers(dbg).150226-1500) amd64fre
LAST_CONTROL_TRANSFER: from fffff801bfefc507 to fffff8005c0263ac
STACK_TEXT:
ffffd00020e91968 fffff801
bfefc507 : 0000000000000000 00000000
00000000 ffffe001765671f0 fffff801
000001c8 : DataNow_Driver!GsDriverEntry [d:\th\minkernel\tools\gs_support\kmode\gs_support.c @ 113]
ffffd00020e91970 fffff801
bfe5ceaa : 0000000000000000 00000000
00000000 0000000000000300 fffff801
bfe12340 : nt!IopLoadDriver+0x51f
ffffd00020e91b40 fffff801
bfb52359 : fffff80100000000 ffffffff
8000139c ffffe00176fa7340 fffff801
bfe12340 : nt!IopLoadUnloadDriver+0x4e
ffffd00020e91b80 fffff801
bfac6a45 : 00000005b19bbdff 00000000
00000080 ffffe0016e8d9680 ffffe001
76fa7340 : nt!ExpWorkerThread+0xe9
ffffd00020e91c10 fffff801
bfbc7ae6 : ffffd000bef00180 ffffe001
76fa7340 fffff801bfac6a04 00000000
00000000 : nt!PspSystemThreadStartup+0x41
ffffd00020e91c60 00000000
00000000 : ffffd00020e92000 ffffd000
20e8c000 0000000000000000 00000000
00000000 : nt!KiStartSystemThread+0x16
FAULTING_SOURCE_LINE: d:\th\minkernel\tools\gs_support\kmode\gs_support.c
FAULTING_SOURCE_FILE: d:\th\minkernel\tools\gs_support\kmode\gs_support.c
FAULTING_SOURCE_LINE_NUMBER: 113
SYMBOL_STACK_INDEX: 0
SYMBOL_NAME: DataNow_Driver!GsDriverEntry+0
FOLLOWUP_NAME: MachineOwner
MODULE_NAME: DataNow_Driver
IMAGE_NAME: DataNow_Driver.sys
DEBUG_FLR_IMAGE_TIMESTAMP: 579a15e7
IMAGE_VERSION: 4.1.161.0
STACK_COMMAND: .cxr 0xffffd00020e90f40 ; kb
BUCKET_ID_FUNC_OFFSET: 0
FAILURE_BUCKET_ID: AV_DataNow_Driver!GsDriverEntry
BUCKET_ID: AV_DataNow_Driver!GsDriverEntry
ANALYSIS_SOURCE: KM
FAILURE_ID_HASH_STRING: km:av_datanow_driver!gsdriverentry
FAILURE_ID_HASH: {dda8a74a-15c0-b974-2bcf-d0804c709cfa}
Followup: MachineOwner
0: kd> !dh DataNow_Driver.sys
File Type: EXECUTABLE IMAGE
FILE HEADER VALUES
8664 machine (X64)
9 number of sections
579A15E7 time date stamp Thu Jul 28 15:25:43 2016
0 file pointer to symbol table
0 number of symbols
F0 size of optional header
22 characteristics
Executable
App can handle >2gb addresses
OPTIONAL HEADER VALUES
20B magic #
14.00 linker version
10000 size of code
3000 size of initialized data
0 size of uninitialized data
163AC address of entry point
1000 base of code
----- new -----
fffff8005c010000 image base
1000 section alignment
200 file alignment
1 subsystem (Native)
10.00 operating system version
10.00 image version
5.02 subsystem version
19000 size of image
400 size of headers
22CE9 checksum
0000000000100000 size of stack reserve
0000000000001000 size of stack commit
0000000000100000 size of heap reserve
0000000000001000 size of heap commit
1E0 DLL characteristics
High entropy VA supported
Dynamic base
Check integrity
NX compatible
0 [0] address [size] of Export Directory
165FC [3C] address [size] of Import Directory
17000 [440] address [size] of Resource Directory
13000 [63C] address [size] of Exception Directory
12C00 [6A90] address [size] of Security Directory
18000 [68] address [size] of Base Relocation Directory
107C0 [38] address [size] of Debug Directory
0 [0] address [size] of Description Directory
0 [0] address [size] of Special Directory
0 [0] address [size] of Thread Storage Directory
10800 [A0] address [size] of Load Configuration Directory
0 [0] address [size] of Bound Import Directory
10000 [240] address [size] of Import Address Table Directory
0 [0] address [size] of Delay Import Directory
0 [0] address [size] of COR20 Header Directory
0 [0] address [size] of Reserved Directory
SECTION HEADER #1
.text name
EC05 virtual size
1000 virtual address
EE00 size of raw data
400 file pointer to raw data
0 file pointer to relocation table
0 file pointer to line numbers
0 number of relocations
0 number of line numbers
68000020 flags
Code
Not Paged
(no align specified)
Execute Read
SECTION HEADER #2
.rdata name
13CC virtual size
10000 virtual address
1400 size of raw data
F200 file pointer to raw data
0 file pointer to relocation table
0 file pointer to line numbers
0 number of relocations
0 number of line numbers
48000040 flags
Initialized Data
Not Paged
(no align specified)
Read Only
Debug Directories(2)
Type Size Address Pointer
cv 95 108a0 faa0 Format: RSDS, guid, 1, F:\Builds\203\DataNow\DataNow_Mainline_Nightly\Sources\DataNow\Source\Output\x64\Win7 Release\PrivatePDBs\DataNow_Driver.pdb
( 13) 198 10938 fb38
SECTION HEADER #3
.data name
900 virtual size
12000 virtual address
200 size of raw data
10600 file pointer to raw data
0 file pointer to relocation table
0 file pointer to line numbers
0 number of relocations
0 number of line numbers
C8000040 flags
Initialized Data
Not Paged
(no align specified)
Read Write
SECTION HEADER #4
.pdata name
63C virtual size
13000 virtual address
800 size of raw data
10800 file pointer to raw data
0 file pointer to relocation table
0 file pointer to line numbers
0 number of relocations
0 number of line numbers
48000040 flags
Initialized Data
Not Paged
(no align specified)
Read Only
SECTION HEADER #5
.gfids name
4 virtual size
14000 virtual address
200 size of raw data
11000 file pointer to raw data
0 file pointer to relocation table
0 file pointer to line numbers
0 number of relocations
0 number of line numbers
48000040 flags
Initialized Data
Not Paged
(no align specified)
Read Only
SECTION HEADER #6
PAGE name
1FF virtual size
15000 virtual address
200 size of raw data
11200 file pointer to raw data
0 file pointer to relocation table
0 file pointer to line numbers
0 number of relocations
0 number of line numbers
60000020 flags
Code
(no align specified)
Execute Read
SECTION HEADER #7
INIT name
EEE virtual size
16000 virtual address
1000 size of raw data
11400 file pointer to raw data
0 file pointer to relocation table
0 file pointer to line numbers
0 number of relocations
0 number of line numbers
62000020 flags
Code
Discardable
(no align specified)
Execute Read
SECTION HEADER #8
.rsrc name
440 virtual size
17000 virtual address
600 size of raw data
12400 file pointer to raw data
0 file pointer to relocation table
0 file pointer to line numbers
0 number of relocations
0 number of line numbers
42000040 flags
Initialized Data
Discardable
(no align specified)
Read Only
SECTION HEADER #9
.reloc name
68 virtual size
18000 virtual address
200 size of raw data
12A00 file pointer to raw data
0 file pointer to relocation table
0 file pointer to line numbers
0 number of relocations
0 number of line numbers
42000040 flags
Initialized Data
Discardable
(no align specified)
Read Only
0: kd> !lmi DataNow_Driver.sys
Loaded Module Info: [datanow_driver.sys]
Module: DataNow_Driver
Base Address: fffff8005c010000
Image Name: DataNow_Driver.sys
Machine Type: 34404 (X64)
Time Stamp: 579a15e7 Thu Jul 28 15:25:43 2016
Size: 19000
CheckSum: 22ce9
Characteristics: 22
Debug Data Dirs: Type Size VA Pointer
CODEVIEW 95, 108a0, faa0 RSDS - GUID: {ED9EDB40-E67B-49A6-8B09-1503E7A31F4D}
Age: 1, Pdb: F:\Builds\203\DataNow\DataNow_Mainline_Nightly\Sources\DataNow\Source\Output\x64\Win7 Release\PrivatePDBs\DataNow_Driver.pdb
?? 198, 10938, fb38 [Data not mapped]
Image Type: MEMORY - Image read successfully from loaded memory.
Symbol Type: PDB - Symbols loaded successfully from image header.
c:\symcache\DataNow_Driver.pdb\ED9EDB40E67B49A68B091503E7A31F4D1\DataNow_Driver.pdb
Compiler: Resource - front end [0.0 bld 0] - back end [14.0 bld 23918]
Load Report: private symbols & lines, source indexed