Repository navigation
test(libkernel): drop backup privileges in denied parent watch - #6599
oneandonlydean merged 1 commit into
Conversation
An elevated Windows process can bypass the parent directory DACL while holding SeBackupPrivilege or SeRestorePrivilege. Remove both privileges before DeniedParentWatch so the test exercises the denied-open path reliably. Co-Authored-By: Adam Franke <10361523+frankea@users.noreply.github.com>
|
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.
|
|
Manual overlap check for the bot warning: #6044 does not change |
|
Tested the non-elevated Windows path (the Windows 11, MinGW-w64 GCC 15.2.0 (WinLibs r7), Release,
Not run: elevated (covered in #6597), Linux (the change is inside AI-assisted: yes. |
|
Thanks @harmsluis for the independent Windows check. I’ve recorded the additional scope: on Windows 11 with WinLibs MinGW-w64 GCC 15.2.0 Release, the non-elevated |
|
Non-elevated Windows data point (Windows 11 Pro 26200, WinLibs GCC 15.2.0 r7, Release), the case the issue lists as not run. On this machine the user name equals the computer name, so
So the AI-assisted: yes (Claude Code). |
What
Remove
SeBackupPrivilegeandSeRestorePrivilegefrom the process token beforeDeniedParentWatchchanges the parent directory DACL. Elevated Windows processes can otherwise bypass that DACL and abort the test instead of exercising the expected denied-open path. The privilege adjustment succeeds without changing non-elevated tokens that do not hold these privileges.Fixes #6597. The related open PR #6173 changes the ACL trustee from a username to the process token SID; this change handles the separate backup-privilege bypass in elevated processes.
Tested
guest_kqueue.GuestKqueue.cppcompiled with-std=c++20 -D_WIN32 -Wall -Wextra -Werror.python3 tools/check_conventions.py --base upstream/main: passed.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)