Uploaded image for project: 'Couchbase Lite'
  1. Couchbase Lite
  2. CBL-3136

[backport] Malformed hostname can cause a crash.

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.8.9
    • 3.0.2
    • Java, Java-Android
    • Security Level: Public
    • None
    • 3

    Description

      A malformed hostname can cause the AbstractC4WebSocket constructor to throw and exception. This is eventually translated to a UnsupportedOperationException thrown by SocketFactory to C4Socket.open.

      This is one of several ways that the latter method can receive an exception and it has no way at all to cope with any of them.

      In particular, it will not tell Core that the open failed and will not, immediately dispose of the LiteCore peer object.

      Any uncaught exception while core is attempting to open a connection to the remote will cause the app to crash.  I think that a combination of Core timeout and a finalizer on the Java socket object keep this from being a serious problem for exceptions that are caught.

      Attachments

        Issue Links

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

          Activity

            Build couchbase-lite-android-3.0.2-7 contains couchbase-lite-java-common commit 8528574 with commit message:
            CBL-3136: Failure during open may cause a crash (#82)

            build-team Couchbase Build Team added a comment - Build couchbase-lite-android-3.0.2-7 contains couchbase-lite-java-common commit 8528574 with commit message: CBL-3136 : Failure during open may cause a crash (#82)

            Build couchbase-lite-android-3.0.2-7 contains couchbase-lite-java-ee-root commit b38fe74 with commit message:
            CBL-3136: Failure during open may cause a crash

            build-team Couchbase Build Team added a comment - Build couchbase-lite-android-3.0.2-7 contains couchbase-lite-java-ee-root commit b38fe74 with commit message: CBL-3136 : Failure during open may cause a crash

            Build couchbase-lite-java-3.0.2-7 contains couchbase-lite-java-common commit 8528574 with commit message:
            CBL-3136: Failure during open may cause a crash (#82)

            build-team Couchbase Build Team added a comment - Build couchbase-lite-java-3.0.2-7 contains couchbase-lite-java-common commit 8528574 with commit message: CBL-3136 : Failure during open may cause a crash (#82)

            Build couchbase-lite-java-3.0.2-7 contains couchbase-lite-java-ee-root commit b38fe74 with commit message:
            CBL-3136: Failure during open may cause a crash

            build-team Couchbase Build Team added a comment - Build couchbase-lite-java-3.0.2-7 contains couchbase-lite-java-ee-root commit b38fe74 with commit message: CBL-3136 : Failure during open may cause a crash

            People

              blake.meike Blake Meike
              blake.meike Blake Meike
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty