reactos/ntoskrnl/include/internal
George Bișoc d0d86ab588
[NTOSKRNL] Force a probe against ReturnLength on query & Misc ICIF stuff
NtQueryInformationToken is by far the only system call in NT where ReturnLength simply cannot be optional. On Windows this parameter is always probed and an argument to NULL directly leads to an access violation exception.
This is due to the fact of how tokens work, as its information contents (token user, owner, primary group, et al) are dynamic and can vary throughout over time in memory.

What happens on current ReactOS master however is that ReturnLength is only probed if the parameter is not NULL. On a NULL case scenario the probing checks succeed and NtQueryInformationToken fails later. For this, just get rid of CompleteProbing
parameter and opt in for a bit mask flag based approach, with ICIF_FORCE_RETURN_LENGTH_PROBE being set on DefaultQueryInfoBufferCheck which NtQueryInformationToken calls it to do sanity checks.

In addition to that...

- Document the ICIF probe helpers
- Annotate the ICIF prope helpers with SAL
- With the riddance of CompleteProbing and adoption of flags based approach, add ICIF_PROBE_READ_WRITE and ICIF_PROBE_READ flags alongside with ICIF_FORCE_RETURN_LENGTH_PROBE
2022-06-12 11:05:05 +02:00
..
amd64 [NTOS:MM] MI_IS_*(): Improve documentation 2021-11-04 23:20:21 +03:00
arch
arm
i386 [NTOS:KE] Implement the internal FPU state context structure 2022-05-24 18:39:45 +02:00
cc.h [NTOS:CC] CcRosFlushVacb(): Fix Iosb annotation 2021-06-22 10:33:45 +02:00
cm.h [NTOS:CM] Adapt cmboot.c for usage in NT/ReactOS bootloader. 2022-04-16 18:37:45 +02:00
cm_x.h
cmboot.h [NTOS:CM] Adapt cmboot.c for usage in NT/ReactOS bootloader. 2022-04-16 18:37:45 +02:00
dbgk.h [REACTOS] Addendum to 5c7ce4475e - Fix MSVC 2015 build 2021-05-12 11:04:29 +02:00
ex.h [NTOSKRNL] Implement InterlockedExchangeSizeT macro 2022-01-11 10:10:56 +01:00
fsrtl.h [REACTOS] Addendum to 5c7ce4475e - Fix MSVC 2015 build 2021-05-12 11:04:29 +02:00
hal.h
hdl.h
icif.h [NTOSKRNL] Force a probe against ReturnLength on query & Misc ICIF stuff 2022-06-12 11:05:05 +02:00
inbv.h [NTOS:INBV] Code refactoring: Move all the boot animation-specific code out of inbv.c and into the new bootanim.c file. 2022-02-13 21:29:14 +01:00
io.h [NTOS:PNP] Halfplement IoInvalidateDeviceState 2022-04-27 02:42:20 +03:00
io_i.h
io_x.h [NTOS:IO] Use a guarded region in IopQueueIrpToThread. 2021-11-20 14:58:51 -05:00
kd.h [NTOS] Remove ROS-specific __NTOSKRNL__ 2022-05-07 17:53:51 +02:00
kd64.h [NTOS:KD][NTOS:KD64][NTOS:KDBG] Fix IRQL & spinlock use 2021-06-29 11:49:20 +02:00
ke.h [NTOS:KE] Unconditionally check IRQL when acquiring & releasing spinlock at DISPATCH_LEVEL 2021-06-29 11:49:20 +02:00
ke_x.h [NTOS:IO] Use a guarded region in IopQueueIrpToThread. 2021-11-20 14:58:51 -05:00
ldr.h
lpc.h [REACTOS] Addendum to 5c7ce4475e - Fix MSVC 2015 build 2021-05-12 11:04:29 +02:00
lpc_x.h
mm.h [NTOS:MM] Add the pool quota prototypes and some definitions 2022-01-11 10:11:08 +01:00
napi.h
ntoskrnl.h [NTOSKRNL] Move the ICIF related code and stuff into a separate header file 2021-05-02 20:49:06 +02:00
ob.h [NTOS:OB] Add a system process quota block macro 2022-01-11 10:11:09 +01:00
ob_x.h [NTOS:OB] Clarify and fix the usage of the Obp*DirectoryLock*() and ObpReleaseLookupContextObject() functions. 2021-09-25 00:47:43 +02:00
po.h [REACTOS] Addendum to 5c7ce4475e - Fix MSVC 2015 build 2021-05-12 11:04:29 +02:00
probe.h [NTOSKRNL] Force a probe against ReturnLength on query & Misc ICIF stuff 2022-06-12 11:05:05 +02:00
ps.h [NTOS:PS] Declare some prototypes and annotate the quota functions with SAL 2022-01-11 10:11:09 +01:00
ps_i.h [NTOS:PS] Support using QUOTA_LIMITS_EX in NtSetInformationProcess(ProcessQuotaLimits) 2021-07-15 19:33:45 +02:00
ps_x.h
rtl.h
se.h [NTOS:SE] Reorganize the security manager component 2022-05-29 20:22:19 +02:00
spinlock.h [NTOS:KE] Test spinlock ownership on both UP & MP build 2021-06-29 11:49:20 +02:00
tag.h [NTOSKRNL] Add FPU pool tags 2022-05-24 18:39:45 +02:00
test.h
vdm.h