The problem with the IP is that it _should_ be at '4a or '4e, but certainly not '4b, because even if the in-memory NDIS image does not match the on-disk binary, the disassembly above shows the code that the machine ought to have been following.
I believe the caveat here is:
Code:
0: kd> .trap fffff880`031af4a0
NOTE: The trap frame does not contain all registers.
Some register values may be zeroed or incorrect.
rax=0000000000000008 rbx=0000000000000000 rcx=fffffa8004861b80
rdx=0000000000000001 rsi=0000000000000000 rdi=0000000000000000
rip=fffff880014e7f4b rsp=fffff880031af630 rbp=fffffa8004861a00
r8=0000000000000000 r9=0000000000000000 r10=fffffa8004861c00
r11=fffff880031af938 r12=0000000000000000 r13=0000000000000000
r14=0000000000000000 r15=0000000000000000
iopl=0 nv up ei pl nz na pe cy
ndis+0x1f4b:
fffff880`014e7f4b 896e20 mov dword ptr [rsi+20h],ebp ds:5c70:00000000`00000020=????????
Not knowing exactly how "real-time" the "trap-frame" operates, I would venture to guess that the
possibility exists that:
the CPU 'instruction-decoder' was in the midst of updating the IP register
(which may only increment +1 at a time, depending upon hw logic gates),
other factors, other reasonings, etc. ("non-orthogonal" instruction set)
Note the instruction mnemonics:
test rsi,rsi
je elsewhere >--> Heres where I "don't know" what TEST does, to satisfy the "GOTO"
mov [rsi],rdi ; 'Zero' start/dest indices seem correct, so reg_dump agrees
If I were a professional, I'd '
Instruction_Breakpoint' at 7f3e, then poke around the registers (during real-time execution).
Then '
Single-step' and poke around some more.
Maybe setting a '
Data_Breakpoint' or two, at curious areas.
By itself, corruption of the in-memory image won't cause the IP to be misaligned though. However badly misrepresented the code may be in memory, perhaps due to software bugs, it's still meant to be precisely followed by the hardware, and the (R)IP should never be between two instructions.
That's where I would think differently:
the 'non-orthogonal' instruction set and the 'instruction-decoder' could well change the IP register with screwy counts:
Immediately to mind would be this fake example:
Opcode 0x40 = Load Accumulator with register C (maybe 2 bytes, immed)
Opcode 0x41 = Load Acc from Memory location 0x1cad (6 bytes?)
A one-bit change, interpreted by the 'instruction-decoder', would delta the IP by +/- 4 more/less than intended.
Debug of the (good) .exe may not show this on the 2nd load, because only the 1st load (real-time run) exhibited the error.
Surely, there exists a hw problem....
If I were a betting man, the CPU!
Isolation requires in-person 'hand-holding', observation, and trusty 'tools'...
Thanks for the discussion - Gotta fire up the barbie now...
Chuck
Hope we don't both get the BanHammer, for getting this thread: