reactos/ntoskrnl/ex
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
..
arm
i386
atom.c [NTOSKRNL] Regroup the pool allocation tags in one dedicated place 2021-12-27 18:57:03 +01:00
callback.c
dbgctrl.c
efi.c
event.c [NTOSKRNL] Force a probe against ReturnLength on query & Misc ICIF stuff 2022-06-12 11:05:05 +02:00
evtpair.c
exintrin.c
fmutex.c
handle.c [NTOS:EX] Manage quotas when allocating or freeing pool tables 2022-01-11 10:11:08 +01:00
harderr.c [NTOSKRNL] Regroup the pool allocation tags in one dedicated place 2021-12-27 18:57:03 +01:00
hdlsterm.c
init.c [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
interlocked.c
keyedevt.c
locale.c [NTOS:EX] ExpGet/SetCurrentUserUILanguage() take pointer to const string. Add an implementation note to NtQueryDefaultUILanguage(). 2022-02-08 15:56:39 +01:00
lookas.c
mutant.c [NTOSKRNL] Force a probe against ReturnLength on query & Misc ICIF stuff 2022-06-12 11:05:05 +02:00
profile.c [NTOSKRNL] Regroup the pool allocation tags in one dedicated place 2021-12-27 18:57:03 +01:00
pushlock.c
resource.c [NTOS:EX] Assert some AcquireResource return values. CID 1321882 2021-11-13 21:23:39 -05:00
rundown.c
sem.c [NTOSKRNL] Force a probe against ReturnLength on query & Misc ICIF stuff 2022-06-12 11:05:05 +02:00
shutdown.c
sysinfo.c [NTOS:EX] Fix version specific return value for NtSetSystemInformation:SystemFlagsInformation 2021-11-21 21:42:04 +01:00
time.c
timer.c [NTOSKRNL] Force a probe against ReturnLength on query & Misc ICIF stuff 2022-06-12 11:05:05 +02:00
uuid.c
win32k.c
work.c
xipdisp.c
zone.c
zw.S