8
: kd> bp CLFS!CClfsLogFcbPhysical::TruncateLogModifyStreams
+
0x127
".if(rax==9){.echo found}.else{gc}"
breakpoint
0
hit
2
: kd> r
rax
=
0000000000000009
rbx
=
0000000000000000
rcx
=
0000000000000009
rdx
=
ffff8b03d81ac200 rsi
=
ffff8b03d449d588 rdi
=
ffffa286d513e000
rip
=
fffff8076b76d74f rsp
=
fffff90c5c4c6f40 rbp
=
fffff90c5c4c7720
r8
=
0000000000000000
r9
=
0000000000000080
r10
=
0000000000001001
r11
=
ffffa286d00d0000 r12
=
0000000000000000
r13
=
0000000000000200
r14
=
ffff8b03d81ab000 r15
=
ffffa286d5a7c960
iopl
=
0
nv up ei ng nz ac po cy
cs
=
0010
ss
=
0018
ds
=
002b
es
=
002b
fs
=
0053
gs
=
002b
efl
=
00040297
CLFS!CClfsLogFcbPhysical::TruncateLogModifyStreams
+
0x127
:
fffff807`
6b76d74f
4c69c008020000
imul r8,rax,
208h
2
: kd> !pool ffff8b03d449d588
Pool page ffff8b03d449d588 region
is
Paged pool
ffff8b03d449c000 doesn't look like a valid small pool allocation, checking to see
if
the entire page
is
actually part of a large page allocation...
*
ffff8b03d449c000 : large page allocation, tag
is
Clfs, size
is
0x2800
bytes
Pooltag Clfs : CLFS General
buffer
,
or
owner page lookaside
list
, Binary : clfs.sys
2
: kd> r
8
: kd> bp CLFS!CClfsLogFcbPhysical::TruncateLogModifyStreams
+
0x14e
/
/
末尾 CLFS_SECTOR_CHANGE 在位置
27f8
+
8
=
2800
rax 寄存器位于下个pool;
Breakpoint
1
hit
2
: kd> r
rax
=
ffff8b03d449e800 rbx
=
0000000000000000
rcx
=
0000000000000009
rdx
=
ffff8b03d81ac200 rsi
=
ffff8b03d449d588 rdi
=
ffffa286d513e000
rip
=
fffff8076b76d776 rsp
=
fffff90c5c4c6f40 rbp
=
fffff90c5c4c7720
r8
=
0000000000000004
r9
=
0000000000000080
r10
=
0000000000001001
r11
=
ffffa286d00d0000 r12
=
0000000000000000
r13
=
0000000000000200
r14
=
ffff8b03d81ab000 r15
=
ffffa286d5a7c960
iopl
=
0
nv up ei ng nz ac po nc
cs
=
0010
ss
=
0018
ds
=
002b
es
=
002b
fs
=
0053
gs
=
002b
efl
=
00040296
CLFS!CClfsLogFcbPhysical::TruncateLogModifyStreams
+
0x14e
:
fffff807`
6b76d776
0f1000
movups xmm0,xmmword ptr [rax] ds:
002b
:ffff8b03`d449e800
=
ffff8b030000018ba0cb3280f59f0e82
2
: kd> !pool ffff8b03d449e800
Pool page ffff8b03d449e800 region
is
Paged pool
ffff8b03d449e810 size:
7c0
previous size:
0
(Allocated) Toke
2
: kd> ?ffff8b03d449e800
-
ffff8b03d449c000
Evaluate expression:
10240
=
00000000
`
00002800
/
/
查看越界读取信息
2
: kd> db ffff8b03d449e800
ffff8b03`d449e800
82
0e
9f
f5
80
32
cb a0
-
8b
01
00
00
03
8b
ff ff .....
2.
.........
ffff8b03`d449e810
00
6f
7c
03
54
6f
6b
65
-
08
a7
0e
dc
03
8b
ff ff .o|.Toke........
ffff8b03`d449e820
00
10
00
00
5c
07
00
00
-
7c
00
00
00
00
00
00
00
....\...|.......
ffff8b03`d449e830 c0
38
85
6c
07
f8 ff ff
-
00
00
00
00
00
00
00
00
.
8.l
............
ffff8b03`d449e840
08
00
00
00
00
00
00
00
-
00
00
00
00
00
00
00
00
................
ffff8b03`d449e850
00
00
00
00
00
00
00
00
-
14
00
08
02
00
00
00
00
................
ffff8b03`d449e860 c0
38
85
6c
07
f8 ff ff
-
e9
1d
b4 da
03
8b
ff ff .
8.l
............
ffff8b03`d449e870
41
64
76
61
70
69
20
20
-
ab
5c
21
00
00
00
00
00
Advapi .\!.....
8
: kd> bp CLFS!CClfsLogFcbPhysical::TruncateLogModifyStreams
+
0x3d3
Breakpoint
2
hit
5
: kd> r
rax
=
fffff90c5c4c6fa8 rbx
=
0000000000000000
rcx
=
ffffa286d513e000
rdx
=
fffff90c5c4c6fb0 rsi
=
0000000000000000
rdi
=
ffffa286d513e000
rip
=
fffff8076b76d9fb rsp
=
fffff90c5c4c6f40 rbp
=
fffff90c5c4c7720
r8
=
fffff90c5c4c6fa0 r9
=
ffff8b03d81ab000 r10
=
ffff8b03d81ab000
r11
=
ffff8b03d81ac3f4 r12
=
000000000000000a
r13
=
0000000000000200
r14
=
ffff8b03d81ab000 r15
=
ffffa286d5a7c960
iopl
=
0
nv up ei ng nz na po nc
cs
=
0010
ss
=
0018
ds
=
002b
es
=
002b
fs
=
0053
gs
=
002b
efl
=
00040286
CLFS!CClfsLogFcbPhysical::TruncateLogModifyStreams
+
0x3d3
:
fffff807`
6b76d9fb
e8ec1a0000 call CLFS!CClfsLogFcbPhysical::WriteOneRawSectorSync (fffff807`
6b76f4ec
)
/
/
r9是目标写入缓冲区,越界的偏移位置是
0x1200
,泄露信息一直.
5
: kd> db ffff8b03d81ab000
+
1200
ffff8b03`d81ac200
82
0e
9f
f5
80
32
cb a0
-
8b
01
00
00
03
8b
ff ff .....
2.
.........
ffff8b03`d81ac210
00
6f
7c
03
54
6f
6b
65
-
08
a7
0e
dc
03
8b
ff ff .o|.Toke........
ffff8b03`d81ac220
00
10
00
00
5c
07
00
00
-
7c
00
00
00
00
00
00
00
....\...|.......
ffff8b03`d81ac230 c0
38
85
6c
07
f8 ff ff
-
00
00
00
00
00
00
00
00
.
8.l
............
ffff8b03`d81ac240
08
00
00
00
00
00
00
00
-
00
00
00
00
00
00
00
00
................
ffff8b03`d81ac250
00
00
00
00
00
00
00
00
-
14
00
08
02
00
00
00
00
................
ffff8b03`d81ac260 c0
38
85
6c
07
f8 ff ff
-
e9
1d
b4 da
03
8b
ff ff .
8.l
............
ffff8b03`d81ac270
41
64
76
61
70
69
20
20
-
ab
5c
21
00
00
00
00
00
Advapi .\!.....
/
/
栈回溯
2
: kd> kv
00
ffff9e0f`
95883f80
fffff801`
382cd0c3
: ffffde86`
1f9a8000
00000000
`
0000000a
ffffaf87`
0ca1c0d8
ffffaf87`
0ca1c001
: CLFS!CClfsLogFcbPhysical::TruncateLogModifyStreams
+
0x14e
01
ffff9e0f`
95884050
fffff801`
382aa1ba
:
00000000
`
00000000
ffffde86`
21c44820
ffffde86`
1f9a8000
ffffde86`
1f9a8000
: CLFS!CClfsLogFcbPhysical::TruncateLog
+
0x8b
02
ffff9e0f`
958840a0
fffff801`
382722a9
: ffffde86`
1f9a8000
ffffde86`
21c44820
00000000
`
00002760
ffffaf87`
0ca1c0d8
: CLFS!CClfsLogFcbPhysical::RecoverTruncateLog
+
0xae
03
ffff9e0f`
95884100
fffff801`
382a0d13
: ffffde86`
1f9a8000
ffffde86`
1f9a8038
ffffde86`
1bef8a40
ffffde86`
0012019f
: CLFS!CClfsLogFcbPhysical::Initialize
+
0x80d
04
ffff9e0f`
95884240
fffff801`
382a276b
: ffffde86`
1f978c70
00000000
`
00000001
00000000
`
00000007
fffff801`
382a0000
: CLFS!CClfsRequest::Create
+
0x4ef
05
ffff9e0f`
95884390
fffff801`
382a2537
: ffffde86`
1f978c70
ffff9e0f`
95884588
ffffde86`
18dcbd60
00000000
`
0012019f
: CLFS!CClfsRequest::Dispatch
+
0x97
06
ffff9e0f`
958843e0
fffff801`
382a2487
: ffffde86`
1f976b30
ffffde86`
1f976b30
ffffde86`
21c46668
00000000
`
000000c0
: CLFS!ClfsDispatchIoRequest
+
0x87
07
ffff9e0f`
95884430
fffff801`
3a22a715
: ffffde86`
18dcbd60
00000000
`
6d4e6f49
ffffde86`
1f0c3010
00000000
`
00000000
: CLFS!CClfsDriver::LogIoDispatch
+
0x27
08
ffff9e0f`
95884460
fffff801`
3a22bd14
:
00000000
`
00000003
ffffde86`
1f976b30
00000000
`
6d4e6f49
fffff801`
3a22b943
: nt!IofCallDriver
+
0x55
09
ffff9e0f`
958844a0
fffff801`
3a61acdd
: ffff9e0f`
95884760
ffffde86`
18dcbd60
ffffde86`
21c46668
ffffde86`
00000000
: nt!IoCallDriverWithTracing
+
0x34
0a
ffff9e0f`
958844f0
fffff801`
3a602c0e
: ffffde86`
18dcbd60
00000000
`
000000bd
ffffde86`
1bef8a20
ffffde86`
1bef8a01
: nt!IopParseDevice
+
0x117d
0b
ffff9e0f`
95884660
fffff801`
3a62d96a
: ffffde86`
1bef8a00
ffff9e0f`
958848c8
00007ffa
`
00000040
ffffde86`
17ee0e80
: nt!ObpLookupObjectName
+
0x3fe
0c
ffff9e0f`
95884830
fffff801`
3a677b9f
:
00000000
`
00000000
000000c7
`
748ff890
00000000
`
00000000
00000000
`
00000001
: nt!ObOpenObjectByNameEx
+
0x1fa
0d
ffff9e0f`
95884960
fffff801`
3a677779
:
000000c7
`
748ff810
ffff9e0f`
95884b80
000000c7
`
748ff890
000000c7
`
748ff880
: nt!IopCreateFile
+
0x40f
0e
ffff9e0f`
95884a00
fffff801`
3a40caf5
:
00000000
`
00000000
00000000
`
00000000
00000000
`
00000000
00000000
`
08f0d180
: nt!NtCreateFile
+
0x79
0f
ffff9e0f`
95884a90
00007ffa
`
1efedb64
:
00007ffa
`
17a820a5
00000000
`
00000000
00000000
`
00000000
00000000
`
00008004
: nt!KiSystemServiceCopyEnd
+
0x25
(TrapFrame @ ffff9e0f`
95884b00
)
10
000000c7
`
748ff798
00007ffa
`
17a820a5
:
00000000
`
00000000
00000000
`
00000000
00000000
`
00008004
00000000
`
00000003
: ntdll!NtCreateFile
+
0x14
11
000000c7
`
748ff7a0
00000000
`
00000000
:
00000000
`
00000000
00000000
`
00008004
00000000
`
00000003
00000000
`
00000000
:
0x00007ffa
`
17a820a5