test(libkernel): deny the kqueue parent listing to the token user's SID #6173
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/6173"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by PYTHONRETARDE on 2026-10-15T00:25:10Z.
What
guest_kqueueaborts on Windows when the user name equals the computer name:DeniedParentWatchdeniesFILE_LIST_DIRECTORYon the watched file's directory to the nameGetUserNameWreturns, passed asTRUSTEE_IS_NAME. On a machine namedJABERwith the local userjaber,LookupAccountNameW(nullptr, L"jaber")resolves to the computer's account domain (SidTypeDomain,S-1-5-21-…-948590136) instead of the user (S-1-5-21-…-948590136-1001). The deny entry then matches no one,FindFirstChangeNotificationWon the parent succeeds, no error is thrown andThrownMessagereturns an empty string.The deny entry now names the SID of the process token's user (
GetTokenInformation(TokenUser),TRUSTEE_IS_SID), so no name lookup is involved. Test-only change; theEVFILT_VNODEimplementation is unchanged.Tested
Windows 11 Pro 10.0.26200, WinLibs GCC 15.2.0 r7, Release,
BUILD_TESTING=ON,mainab9a4768+ this commit. Userjaberon computerJABER.guest_kqueuefails 3 of 3 (Exit code 0xc0000409, the message above).guest_kqueuepasses 5 of 5, so the parent watch is denied and the error carriesparent,error=5and the directory.guest_getloginpasses.tools/check_conventions.py --base upstream/mainpasses.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T12:16:00Z.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
core/libs/tests/GuestKqueue.cppcore/libs/tests/GuestKqueue.cppcore/libs/tests/GuestKqueue.cppImported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-15T22:25:21Z.
I reviewed the shared test-file change against the elevated-token report. #6173 fixes the ACL trustee identity; #6599 addresses the separate case where SeBackupPrivilege / SeRestorePrivilege let an elevated process bypass that ACL. The helper and call are confined to DeniedParentWatch, so the PRs do not depend on each other or overlap in changed lines.