reactos/ntoskrnl/io/iomgr
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
..
adapter.c
arcname.c [NTOS:IO] Check RtlAnsiStringToUnicodeString return value when initializing Arc names 2021-06-28 10:20:57 +02:00
bootlog.c [REACTOS] Cleanup INIT and some PAGE section allocations 2020-11-02 21:45:31 +03:00
controller.c
device.c
deviface.c [NTOS:IO] IoRegisterDeviceInterface: create non-volatile keys for new device interfaces 2022-03-28 08:13:05 +02:00
driver.c [NTOSKRNL] Regroup the pool allocation tags in one dedicated place 2021-12-27 18:57:03 +01:00
error.c [NTOS:IO] Be more specific for chasing CORE-17587 2021-05-26 11:03:34 +02:00
file.c [NTOS:IO] Do not set Shared property of the file if we are failing in IoCheckShareAccess 2020-12-22 11:05:00 +01:00
iocomp.c [NTOSKRNL] Force a probe against ReturnLength on query & Misc ICIF stuff 2022-06-12 11:05:05 +02:00
ioevent.c
iofunc.c [NTOS:IO] Fail, if io completion port and an apc routine are used at the same time 2021-11-24 13:34:26 +01:00
iomdl.c
iomgr.c [NTOS:PNP] Implement NT5.2-like DEVICE_NODE state management 2021-01-27 05:15:15 +03:00
iorsrce.c [NTOS:IO] Do not crash when calling IopLegacyResourceAllocation with NULL ResourceRequirements 2021-11-01 18:16:25 +01:00
iotimer.c
iowork.c
irp.c [NTOS:IO] Fix IRP stack location check in IoForwardIrpSynchronously 2020-09-07 04:57:17 +03:00
irq.c
ramdisk.c [NTOS:IO] Check RtlAnsiStringToUnicodeString return value when initializing ramdisk 2021-06-28 10:20:57 +02:00
rawfs.c [NTOS:RAWFS] LE JOKE! - Commit 7716bddd (r24564) claimed to "actually create the \\Device names so that user-mode can even talk to it", yet didn't bother to do that! 2021-09-26 03:02:58 +02:00
remlock.c
symlink.c
util.c
volume.c [REACTOS] Cleanup INIT and some PAGE section allocations 2020-11-02 21:45:31 +03:00