Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(v9) Security fixes #13301

Merged
merged 4 commits into from
Jun 8, 2022
Merged

(v9) Security fixes #13301

merged 4 commits into from
Jun 8, 2022

Conversation

r0mant
Copy link
Collaborator

@r0mant r0mant commented Jun 8, 2022

Ported from a private release.

Joerger and others added 4 commits June 8, 2022 09:32
This commit includes two fixes:

1. Enforce an application/json Content-Type server-side.
2. When checking the bearer token, verify that the user
   associated with the token matches the user associated
   with the cookie.
When data flow is disabled in TermManager (at the beginning or when TermManager.Off was called) we should ignore all input we receive (currently we buffer it)
@github-actions github-actions bot added the tsh tsh - Teleport's command line tool for logging into nodes running Teleport. label Jun 8, 2022
@github-actions github-actions bot requested review from jakule and smallinsky June 8, 2022 16:40
@r0mant r0mant enabled auto-merge (squash) June 8, 2022 16:58
@r0mant r0mant merged commit 82c446f into branch/v9 Jun 8, 2022
"golang.org/x/sys/unix"
)

func TestAgentSocketPermissions(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test can run as a root. The name needs to be changed: https://github.com/gravitational/teleport/blob/master/Makefile#L627-L638

require.True(t, isRoot())
})

nonRoot, err := user.LookupId("1000")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is system dependent. Not every OS has a user with ID 1000.

require.True(t, !isRoot())

err := unix.Unlink(agentServer.Path)
require.Error(t, err)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably check what error is returned

@r0mant r0mant deleted the v9/secfix0422 branch June 8, 2022 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tsh tsh - Teleport's command line tool for logging into nodes running Teleport.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants