Based on my extensive search across GitHub, I've identified a critical security pattern where Windows codebases are NOT checking for pseudo-handle values (specifically -2 / GetCurrentThread()) before using DuplicateHandle().
The bug exists when code follows this unsafe pattern:
// VULNERABLE PATTERN - Missing pseudo-handle check