Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash at wrong time causing data key issues due to no decrypt callback support #7859

Closed
4 tasks done
mitchcapper opened this issue May 29, 2018 · 1 comment
Closed
4 tasks done
Labels

Comments

@mitchcapper
Copy link


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.

@stale
Copy link

stale bot commented Jan 28, 2022

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the wontfix label Jan 28, 2022
@stale stale bot closed this as completed Feb 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant