famedly / matrix-dart-sdk

Matrix SDK written in pure Dart.
GNU Affero General Public License v3.0
62 stars 31 forks source link

UseAfterFreeError Attempted to use (or double-free) a freed libolm object #1890

Open akvus opened 3 months ago

akvus commented 3 months ago

Checklist

In which Project did the bug appear?

No response

If you selected \"Other\" as Project, please enter in which project the bug occurred.

No response

On which platform did the bug appear?

Android, iOS

SDK Version

flutter_olm 2.0.0

Describe the problem caused by this bug

We have recently udpated to flutter_olm 2.0.0. We are seeing in our monitoring tool the following reports coming in:

UseAfterFreeError Attempted to use (or double-free) a freed libolm object

native.dart in _NativeObject._inst at line 121 within olm
In App
native.dart in SAS.get_pubkey at line 598 within olm
In App
key_verification.dart in _KeyVerificationMethodSas.makeSas at line 1427 within matrix
In App
key_verification.dart in KeyVerification.sasNumbers at line 691 within matrix
In App
key_verification_service.dart in KeyVerificationService.getSasNumbers at line 109 within apo_app
In App
verify_with_numbers_dialog.dart in VerifyWithNumbersDialog.build at line 134 within apo_app
In App
consumer.dart in _ConsumerState.build at line 476 within flutter_riverpod
In App
Called from:
framework.dart in StatefulElement.build within flutter
System
consumer.dart in ConsumerStatefulElement.build at line 539 within flutter_riverpod
In App
Called from:
framework.dart in ComponentElement.performRebuild within flutter

This seems to happen after we log Key verification request accepted SAS.

Steps To Reproduce

No response

Screenshots or Logs

No response

Security related

No response

krille-chan commented 3 months ago

I cannot reproduce this by starting a key verification on mobile. Don't see these logs there. Can you add steps to reproduce with a minimum code example?

akvus commented 3 months ago

The problem is we are not able to reproduce it yet, we only see the errors arriving at our monitoring system. Once we get it I will post an update.