MINA SSHD
  1. MINA SSHD
  2. SSHD-115

Missing return handling SFTP SSH_FXP_OPEN cannot create error

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.5.0
    • Fix Version/s: 0.6.0
    • Labels:
      None

      Description

      Stress testing the SFTP Subsystem I found protocol errors when file creation failed. This is due to a missing return after the error status is sent.

      The patch is simple...

      --- SftpSubsystem.java	(revision 1086267)
      +++ SftpSubsystem.java	(working copy)
      @@ -409,6 +409,7 @@
                                   if (((pflags & SSH_FXF_CREAT) != 0)) {
                                       if (!file.isWritable()) {
                                           sendStatus(id, SSH_FX_FAILURE, "Can not create " + path);
      +                                    return;
                                       }
                                       file.create();
                                   }
      

        Activity

        Michael Stevens created issue -
        Guillaume Nodet made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Guillaume Nodet [ gnt ]
        Fix Version/s 0.6.0 [ 12315514 ]
        Resolution Fixed [ 1 ]
        Michael Stevens made changes -
        Description Stress testing the SFTP Subsystem I found protocol errors when file creation failed. This is due to a missing return after the error status is sent.

        The patch is simple...

        --- SftpSubsystem.java (revision 1086267)
        +++ SftpSubsystem.java (working copy)
        @@ -409,6 +409,7 @@
                                     if (((pflags & SSH_FXF_CREAT) != 0)) {
                                         if (!file.isWritable()) {
                                             sendStatus(id, SSH_FX_FAILURE, "Can not create " + path);
        + return;
                                         }
                                         file.create();
                                     }
        Stress testing the SFTP Subsystem I found protocol errors when file creation failed. This is due to a missing return after the error status is sent.

        The patch is simple...

        {code}
        --- SftpSubsystem.java (revision 1086267)
        +++ SftpSubsystem.java (working copy)
        @@ -409,6 +409,7 @@
                                     if (((pflags & SSH_FXF_CREAT) != 0)) {
                                         if (!file.isWritable()) {
                                             sendStatus(id, SSH_FX_FAILURE, "Can not create " + path);
        + return;
                                         }
                                         file.create();
                                     }
        {code}
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        7d 19h 27m 1 Guillaume Nodet 05/Apr/11 11:56

          People

          • Assignee:
            Guillaume Nodet
            Reporter:
            Michael Stevens
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development