[NDK]: Add OB_FLAG_KERNEL_EXCLUSIVE and OBJ_KERNEL_EXCLUSIVE flags
authorAlex Ionescu <aionescu@gmail.com>
Thu, 24 Sep 2015 02:40:30 +0000 (02:40 +0000)
committerAlex Ionescu <aionescu@gmail.com>
Thu, 24 Sep 2015 02:40:30 +0000 (02:40 +0000)
commitf8f8f5c96b1b18e0cc341e6e4d0f64612b924372
tree8cb2a57350377c45672f9880293019822974718c
parentd65c53b046c2268fc60a015db71543dbbf34b690
[NDK]: Add OB_FLAG_KERNEL_EXCLUSIVE and OBJ_KERNEL_EXCLUSIVE flags
[NTOSKRNL]: Add a helper function such that user-mode cannot pass certain kernel-only object attributes to ObOpenObjectByPointer.
[NTOSKRNL]: Make \Device\PhysicalMemory OBJ_KERNEL_EXCLUSIVE
[NTOSKRNL]: Deny access to user-mode when opening a handle to an object with OBJ_KERNEL_EXCLUSIVE
[NTOSKRNL]: Fix NtOpenProcess, NtOpenThread, NtOpenThreadTokenEx, NtOpenProcessTokenEx to use the helper function. Should fix Rtl using OBJ_KERNEL_HANDLE in user-mode.
Thanks to ThFabba for finding out these bugs, and the hbelusca for adding a missing check to NtOpenProcessTokenEx.

svn path=/trunk/; revision=69340
reactos/include/ndk/obtypes.h
reactos/ntoskrnl/include/internal/ob_x.h
reactos/ntoskrnl/mm/section.c
reactos/ntoskrnl/ob/obhandle.c
reactos/ntoskrnl/ob/oblife.c
reactos/ntoskrnl/ob/obname.c
reactos/ntoskrnl/ps/process.c
reactos/ntoskrnl/ps/security.c
reactos/ntoskrnl/ps/thread.c
reactos/ntoskrnl/se/token.c