Skip to content

[v15] prevent session id reuse#42164

Merged
capnspacehook merged 1 commit intobranch/v15from
capnspacehook/backport/v15/42123
Jul 9, 2024
Merged

[v15] prevent session id reuse#42164
capnspacehook merged 1 commit intobranch/v15from
capnspacehook/backport/v15/42123

Conversation

@capnspacehook
Copy link
Copy Markdown
Contributor

@capnspacehook capnspacehook commented May 30, 2024

Backport of #42123.

changelog: Fixed session recordings getting overwritten or not uploaded

Copy link
Copy Markdown
Collaborator

@r0mant r0mant left a comment

Choose a reason for hiding this comment

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

Let's hold off this v15 backport until we're done with v16 test plan.

@rosstimothy
Copy link
Copy Markdown
Contributor

The v16 backport only just landed, if most folks use alpha.2 to perform the test plan they won't be exercising any of this code to find problems though.

@r0mant
Copy link
Copy Markdown
Collaborator

r0mant commented May 30, 2024

Yes, let's cut another release. I'll kick it off now.

@marcoandredinis marcoandredinis removed their request for review July 8, 2024 09:12
@rosstimothy
Copy link
Copy Markdown
Contributor

Is this good to land in v15 now?

@capnspacehook
Copy link
Copy Markdown
Contributor Author

It should be, no issues related to it were found in the test plan

@capnspacehook capnspacehook force-pushed the capnspacehook/backport/v15/42123 branch from 39c2e95 to 6b9686e Compare July 8, 2024 20:32
@capnspacehook capnspacehook enabled auto-merge July 8, 2024 20:34
@public-teleport-github-review-bot public-teleport-github-review-bot bot removed the request for review from rosstimothy July 9, 2024 10:15
* prevent SSH session id reuse

If a user sets `TELEPORT_SESSION` to a session ID
that isn't running, the sent session ID is ignored
and a new one is used to prevent the user
controlling the value. When parsing a session ID
the parsed result is used to ensure all session
IDs will have the same format.
`CreateSessionTracker` is updated to create
instead of upsert to ensure `SessionTracker`
resources cannot be overwritten by accident.

Clients often need to know the current session ID,
and before when they were in control of it that
wasn't an issue. To fix this servers will send the
current session ID in a SSH channel request on the
channel the SSH session was created on. This
should be fully backwards compatible, as when an
unknown SSH request type is received clients will
just ignore it/reply with false.

* add test for wrappedSSHConn
@capnspacehook capnspacehook force-pushed the capnspacehook/backport/v15/42123 branch from 6b9686e to afaa063 Compare July 9, 2024 19:26
@capnspacehook capnspacehook added this pull request to the merge queue Jul 9, 2024
Merged via the queue into branch/v15 with commit a3a6521 Jul 9, 2024
@capnspacehook capnspacehook deleted the capnspacehook/backport/v15/42123 branch July 9, 2024 20:03
This was referenced Jul 11, 2024
This was referenced Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants