Author: tfaber
Date: Mon Jan 28 18:58:55 2013
New Revision: 58247
URL:
http://svn.reactos.org/svn/reactos?rev=58247&view=rev
Log:
[NTOSKRNL:MM]
- Validate virtual address range on pool free
CORE-6929
CORE-6712 #resolve
Modified:
trunk/reactos/ntoskrnl/mm/ARM3/pool.c
Modified: trunk/reactos/ntoskrnl/mm/ARM3/pool.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/pool.c?re…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/pool.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/pool.c [iso-8859-1] Mon Jan 28 18:58:55 2013
@@ -408,8 +408,11 @@
//
// Use a simple bounds check
//
- return (PoolAddress >= MmPagedPoolStart) && (PoolAddress <=
MmPagedPoolEnd) ?
- PagedPool : NonPagedPool;
+ if (PoolAddress >= MmPagedPoolStart && PoolAddress <= MmPagedPoolEnd)
+ return PagedPool;
+ else if (PoolAddress >= MmNonPagedPoolStart && PoolAddress <=
MmNonPagedPoolEnd)
+ return NonPagedPool;
+ KeBugCheckEx(BAD_POOL_CALLER, 0x42, (ULONG_PTR)PoolAddress, 0, 0);
}
PVOID