You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Interestingly the server behavior between 2.5 and 2.7 seemed to have changed. In 2.5 a crash during the decrypt callback would result in the data being replayed to the client during the next connect to the server. In 2.7 even though the clients state has not been updated the server does not replay the missed message but the next message goes through fine. The other message is dropped without issue.
The text was updated successfully, but these errors were encountered:
Bug description
During decrypt there is no chance for the message to be handled before the session state is updated and reflected on the server. This can cause problems especially if there is a crash in the handling causing the state to not be properly synced. The native protocol library does have a decrypt that supports a callback https://github.com/signalapp/libsignal-protocol-java/blob/7d94f31a99ab265b083d6179d02029517f0d8069/java/src/main/java/org/whispersystems/libsignal/SessionCipher.java#L174 but https://github.com/signalapp/libsignal-service-java/blob/master/java/src/main/java/org/whispersystems/signalservice/api/crypto/SignalServiceCipher.java does not use it.
The local state can be updated, then a crash before the server notified will cause a 'replay' event to potentially occur and the client to see it as out of sequence.
This was detected in the 3rd party library copy that had the same bug and discussed at signal-csharp/libsignal-service-dotnet#18
Interestingly the server behavior between 2.5 and 2.7 seemed to have changed. In 2.5 a crash during the decrypt callback would result in the data being replayed to the client during the next connect to the server. In 2.7 even though the clients state has not been updated the server does not replay the missed message but the next message goes through fine. The other message is dropped without issue.
The text was updated successfully, but these errors were encountered: