0x8A81FAA比0x7FFFFFF0000小,为什么它是真的呢?

#if defined(_X86_)
#define ProbeForReadUnicodeStringFullBuffer(String) \
if (((ULONG_PTR)((String).Buffer) & (sizeof(BYTE) - 1)) != 0) { \
ExRaiseDatatypeMisalignment(); \
} else if ((((ULONG_PTR)((String).Buffer) + ((String).MaximumLength)) < (ULONG_PTR)((String).Buffer)) || \
(((ULONG_PTR)((String).Buffer) + ((String).MaximumLength)) > (ULONG_PTR)MM_USER_PROBE_ADDRESS)) { \
ExRaiseAccessViolation(); \
} else if (((String).Length) > ((String).MaximumLength)) { \
ExRaiseAccessViolation(); \
}
#else
#define ProbeForReadUnicodeStringFullBuffer(String) \
if (((ULONG_PTR)((String).Buffer) & (sizeof(WCHAR) - 1)) != 0) { \
DbgPrint("aaaaaa");\
ExRaiseDatatypeMisalignment(); \
} else if ((((ULONG_PTR)((String).Buffer) + ((String).MaximumLength)) < (ULONG_PTR)((String).Buffer)) || \
(((ULONG_PTR)((String).Buffer) + ((String).MaximumLength)) > (ULONG_PTR)MM_USER_PROBE_ADDRESS)) { \
DbgPrint("bool = %d\n", (((ULONG_PTR)((String).Buffer) + ((String).MaximumLength)) < (ULONG_PTR)((String).Buffer))); \
DbgPrint("bool2 = %d\n", (((ULONG_PTR)((String).Buffer) + ((String).MaximumLength)) > (ULONG_PTR)MM_USER_PROBE_ADDRESS)); \
DbgPrint("fsdgfd = %d\n", ((ULONG_PTR)((String).Buffer) + ((String).MaximumLength)));\
DbgPrint("asdasd = %llu\n", (ULONG_PTR)MM_USER_PROBE_ADDRESS);\
DbgPrint("bbbbbbb : %d %d %llu\n", ((ULONG_PTR)((String).Buffer) + ((String).MaximumLength)), (ULONG_PTR)((String).Buffer), (ULONG_PTR)MM_USER_PROBE_ADDRESS);\
ExRaiseAccessViolation(); \
} else if (((String).Length) > ((String).MaximumLength)) { \
DbgPrint("cccccccc");\
ExRaiseAccessViolation(); \
}
#endif发布于 2020-03-27 22:59:02
如果你改变了
DbgPrint("fsdgfd = %d\n", ((ULONG_PTR)((String).Buffer) + ((String).MaximumLength)));\至
DbgPrint("fsdgfd = %llu\n", ((ULONG_PTR)((String).Buffer) + ((String).MaximumLength)));\值显示为
0xFFFFF8A020CB18EA
经过更多的研究,我发现我甚至不需要一个ProbeForRead,因为指针是一个KernelMode指针,并且不需要验证内核模式指针,它们是可信的。
https://stackoverflow.com/questions/60888080
复制相似问题