Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-21387

SSH connection stopped working with AES-CBC mode

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: Qt Creator 4.7.1
    • Fix Version/s: Qt Creator 4.8.0-beta2
    • Component/s: Remote Linux
    • Labels:
      None
    • Environment:
      I have also used this useful code to connect to Switches and Routers Cisco. I know this is not its purpose but someone else could have the same problem connecting to remote Linux hosts.

      Sorry for my bad English.
    • Platform/s:
      Linux/X11
    • Commits:
      4c82dd6d120e07b382a7ac59b2dd0d8212dab955 (qt-creator/qt-creator/4.8)

      Description

      Before adding CTR support for AES I was able to connect to remote hosts with CBC. Now with the new code (4.7.1) I can connect with CTR mode but connection with CBC mode stopped working.

       

      Bad decrypted length in SshIncomingPacket::calculateLength() as shown in log attached.

       

      A simple workaround I performed was to replace the new code with the old one:

      classes SshEncryptionFacility and SshDecryptionFacility:

      function makeCipherMode:

      switch (mode) {
      case CbcMode:

      { //old code: CBC_Encryption *cbc = new CBC_Encryption(cipher, new Null_Padding); Cipher_Mode_Filter *filter = new Cipher_Mode_Filter(cbc); filter->set_iv(iv); filter->set_key(key); return filter;   //commenting the new code: // return get_cipher(cipher->name() + "/CBC/NoPadding", key, iv, ENCRYPTION); }

      case CtrMode:
      return makeCtrCipherMode(cipher, iv, key);
      }

      After that, both CBC and CTR modes work successfully.

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            kandeler Christian Kandeler
            Reporter:
            jidc Jose Israel de Leon Cordon
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes