Local code intelligence for developers and AI agents. Connect code, docs and infrastructure in a persistent graph, with CBM Lens, MCP tools, agent integrations and change-aware test selection.
C aiderastclaude-codecode-analysiscode-intelligencecodexcursorcypherdeveloper-toolsgemini-cligraph-visualizationkilocodeknowledge-graphmcpmcp-servermodel-context-protocolopencodesqlitetree-sitterwindsurf
fix(windows): accept the OWNER RIGHTS (S-1-3-4) ACE in DACL validation
Martin Vogel8b4e0fb50d89
diff --git a/src/daemon/ipc.c b/src/daemon/ipc.cindex 12205c3ca..12e6a5b7b 100644--- a/src/daemon/ipc.c+++ b/src/daemon/ipc.c@@ -3875,7 +3875,13 @@ static bool win_bounded_sid_trusted(win_security_t *security, const uint8_t *sidsecurity->get_length_sid((PSID)sid) == (DWORD)sid_length &&(win_sid_trusted(security, (PSID)sid) ||(creator_owner_inherit_only &&- security->is_well_known_sid((PSID)sid, WinCreatorOwnerSid)));+ security->is_well_known_sid((PSID)sid, WinCreatorOwnerSid)) ||+ /* OWNER RIGHTS (S-1-3-4) modulates the rights of whoever OWNS the+ * object; the owner is separately validated as the exact current+ * user, so such an ACE only ever grants to us. Default Windows+ * profile/temp ACLs (and GitHub runner profiles) carry it, and+ * rejecting it locked real current-user directories out. */+ security->is_well_known_sid((PSID)sid, WinCreatorOwnerRightsSid));}static bool win_file_owner_secure(win_security_t *security, HANDLE file,diff --git a/src/launcher/windows_launcher.c b/src/launcher/windows_launcher.cindex cb9acd547..41ae6d9dd 100644--- a/src/launcher/windows_launcher.c+++ b/src/launcher/windows_launcher.c@@ -228,7 +228,11 @@ static bool launcher_bounded_ace_sid_is_trusted(const ACE_HEADER *header, PSID cGetLengthSid((PSID)sid) == (DWORD)sid_length &&(launcher_sid_is_trusted((PSID)sid, current_user) ||(((header->AceFlags & INHERIT_ONLY_ACE) != 0U) &&- IsWellKnownSid((PSID)sid, WinCreatorOwnerSid)));+ IsWellKnownSid((PSID)sid, WinCreatorOwnerSid)) ||+ /* OWNER RIGHTS (S-1-3-4) applies to the validated current-user+ * owner; default profile ACLs carry it, and rejecting it locked+ * the launcher out of legitimate current-user directories. */+ IsWellKnownSid((PSID)sid, WinCreatorOwnerRightsSid));}static bool launcher_security_is_safe(HANDLE file, bool require_current_owner, DWORD mutation) {