Uploaded image for project: 'MINA SSHD'
  1. MINA SSHD
  2. SSHD-699

Server receiving 0-length SSH_MSG_IGNORE causes Buffer Underflow exception

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.2.0
    • 1.3.0
    • None

    Description

      Trying to establish the length of a message with only a header byte will cause a buffer underflow exception. I noticed it on SSH_MSG_IGNORE, but it is probably general to all messages.

      Reproducible with unit test:

      AbstractSessionTest.java
          @Test
          public void testZeroLengthIgnoreMessage() throws Exception {
              Buffer msg = session.createBuffer(SshConstants.SSH_MSG_IGNORE, Byte.SIZE);
              session.handleIgnore(msg);
          }
      

      This is a regression since 0.14.0, which did not have this problem.

      Attachments

        Activity

          People

            lgoldstein Lyor Goldstein
            johan.ostling Johan Östling
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: