Skip to content

Comments

Bump paramiko from 3.3.1 to 3.4.0#163

Merged
manfred-kaiser merged 2 commits intomasterfrom
dependabot/pip/paramiko-3.4.0
Jan 2, 2024
Merged

Bump paramiko from 3.3.1 to 3.4.0#163
manfred-kaiser merged 2 commits intomasterfrom
dependabot/pip/paramiko-3.4.0

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Dec 19, 2023

Bumps paramiko from 3.3.1 to 3.4.0.

Commits
  • f0881ba Cut 3.4.0
  • 3e4bdf9 Changelog/comment updates
  • 30b447b Linting
  • 33508c9 Expand MessageOrderError use to handle more packet types
  • 96db1e2 Raise exception when sequence numbers rollover during initial kex
  • 58785d2 Changelog tweak re: other new Transport kwarg
  • 8dcb237 Test-suite-only bugfix: defer did not actually imply skip_verify
  • fa46de7 Reset sequence numbers on rekey
  • 75e311d Enforce zero seqno on kexinit
  • 73f079f Fill in CVE number for Terrapin attack
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    You can disable automated security fix PRs for this repo from the Security Alerts page.

Bumps [paramiko](https://github.com/paramiko/paramiko) from 3.3.1 to 3.4.0.
- [Commits](paramiko/paramiko@3.3.1...3.4.0)

---
updated-dependencies:
- dependency-name: paramiko
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Dec 19, 2023
@alex
Copy link

alex commented Dec 20, 2023

@manfred-kaiser
Copy link
Member

This is needed to resolve https://terrapin-attack.com/

Thanks for the information 👍🏻 😄

This vulnerability looks very interesting and I want to implement some tests - at least detection of vulnerable clients/servers and perhaps the PoC exploits for further tests.

I need to test, if SSH-MITM is compatible with paramiko 3.4. The last minor update of paramiko had some breaking changes #143 #148 😞

This is the reason why SSH-MITM has a strict version definition in the requirements.in file:

paramiko>=3.3,<3.4

@alex
Copy link

alex commented Dec 20, 2023

The diff is pretty minimal, so hopefully there's no breakages: paramiko/paramiko@3.3.1...3.4.0

@manfred-kaiser
Copy link
Member

The diff is pretty minimal, so hopefully there's no breakages: paramiko/[email protected]

Thanks for the diff, this helped me a lot to find out what had changed since the last release.

Sadly, there are more changes as expected 😞 and the fix for terrapin-attack changed the same code as my workarounds for SSH-MITM which are needed to intercept some ssh clients.

@manfred-kaiser
Copy link
Member

manfred-kaiser commented Dec 22, 2023

I have done some tests and reviewed the changes in paramiko. paramikos fix for Terrapin-attck should have no conflicts with the changes done by my workarounds. SSH-MITM monkey patches 2 methods from paramikos Transport class.

Only handling the packets in kex-init is affected by this update.
SSH-MITM must ignore some packets during kex-init, because those packets will break the intercepted connections.
I think it should be possible to add compatibility for kex-strict whithout breaking SSH-MITM's functionality.

if ptype not in self._expected_packet:
if ptype == 30:
# according to rfc 4253, the next packet should be ignored,
# when first_kex_packet_follows is True
# this is a workarround at the moment, but connection works
continue
raise SSHException(
"Expecting packet from {!r}, got {:d}".format(
self._expected_packet, ptype
)
) # noqa

The same lines are changed by the terrapin-attack fix:

https://github.com/paramiko/paramiko/blob/f0881ba8af57d1a122ef19c40d144afdcb6e0824/paramiko/transport.py#L2173-L2181

if ptype not in self._expected_packet:
    exc_class = SSHException
    if self.agreed_on_strict_kex:
        exc_class = MessageOrderError
    raise exc_class(
        "Expecting packet from {!r}, got {:d}".format(
            self._expected_packet, ptype
        )
    )  # noqa

@manfred-kaiser manfred-kaiser merged commit 4fae88a into master Jan 2, 2024
@dependabot dependabot bot deleted the dependabot/pip/paramiko-3.4.0 branch January 2, 2024 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants