You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The call to get_handles is limited to PID sizes of up to 65535 (USHRT_MAX). This is because of this call to NtQuerySystemInformation.
As it's undocumented it's hard to hunt down but it looks like the NtQuerySystemInformation call is limited to PIDs in the range of an unsigned short. To fix this instead of SYSTEM_HANDLE_INFORMATION we would need to consider using SYSTEM_HANDLE_INFORMATION_EX to query the system handles.
I think it would be safer to possibly use UpdateProcThreadAttribute() (at least for vista +) as suggested originally. It seems a bit unnecessary to iterate over all the system handles in order to limit the handles inherited by a process when UpdateProcThreadAttribute() is supported.
The text was updated successfully, but these errors were encountered:
The call to get_handles is limited to PID sizes of up to 65535 (USHRT_MAX). This is because of this call to NtQuerySystemInformation.
As it's undocumented it's hard to hunt down but it looks like the NtQuerySystemInformation call is limited to PIDs in the range of an unsigned short. To fix this instead of SYSTEM_HANDLE_INFORMATION we would need to consider using SYSTEM_HANDLE_INFORMATION_EX to query the system handles.
I think it would be safer to possibly use UpdateProcThreadAttribute() (at least for vista +) as suggested originally. It seems a bit unnecessary to iterate over all the system handles in order to limit the handles inherited by a process when UpdateProcThreadAttribute() is supported.
The text was updated successfully, but these errors were encountered: