mirror of
https://github.com/slackhq/nebula.git
synced 2026-11-15 15:46:52 +01:00
Warn when the info API's windows pipe is outside the protected namespace
A program reading the info API opens the pipe by name and has no owner check of its own, so for a name any local user could create first, whoever did would be answering its queries. nebula refuses to serve a held name and logs it, but the program cannot tell. The daemon now warns at bind when the configured name is not under \\.\pipe\ProtectedPrefix\Administrators\, and the example config and CHANGELOG say to put it there. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
660a271466
commit
c5c826d163
5 files changed
+30
-1
No files matched your search
@@ -42,3 +42,11 @@ func TestSDDLAdmitsTheGroup(t *testing.T) {
|
||||
assert.Zero(t, pipeClientAccess&windows.FILE_APPEND_DATA, "FILE_APPEND_DATA is FILE_CREATE_PIPE_INSTANCE on a pipe")
|
||||
assert.Zero(t, pipeClientAccess&(windows.GENERIC_READ|windows.GENERIC_WRITE|windows.GENERIC_ALL))
|
||||
}
|
||||
|
||||
// TestUnprotectedNameWarning: a pipe outside the protected namespace is warned about,
|
||||
// since anyone could have created the name first; one under it, however spelled, is not.
|
||||
func TestUnprotectedNameWarning(t *testing.T) {
|
||||
assert.Empty(t, unprotectedNameWarning(DefaultSocketPath))
|
||||
assert.Empty(t, unprotectedNameWarning(`\\.\PIPE\protectedprefix\administrators\nebula-info`))
|
||||
assert.Contains(t, unprotectedNameWarning(`\\.\pipe\nebula-info`), protectedPrefix)
|
||||
}
|
||||
Reference in new issue
Block a user