I'm sorry for not being able to provide a more detailed stack trace, it would require me to rebuild TrackerControl with debug symbols, which I don't have the time for right now.
I don't know if it is the reason for this crash but it seems to me there's a clear use-after-free bug here:
Install TrackerControl on a phone with MTE enabled
Use TrackerControl, it will crash as soon as it is being used
I don't know if the Android emulator supports MTE, but even if it does not, you should probably be able to catch this bug using the address sanitizer from the NDK
@thestinger might have some hints on how to debug this properly when you don't have a MTE capable phone available.
Hi! First and foremost, thanks a lot for your amazing app.
I use the latest F-Droid version of TrackerControl
2024.01.03-fdroid
on GrapheneOS with a Pixel phone which supports memory tagging (MTE).Describe the bug
As soon as I start TrackerControl with MTE enabled, the app crashes (the kernel sends a SEGV signal to the app).
Here's the stacktrace:
The crash happens in the handle_events function in
libnetguard.so
.I'm sorry for not being able to provide a more detailed stack trace, it would require me to rebuild TrackerControl with debug symbols, which I don't have the time for right now.
I don't know if it is the reason for this crash but it seems to me there's a clear use-after-free bug here:
https://github.com/TrackerControl/tracker-control-android/blob/acba328758a25c285a56451dcc6641e4b0545bcd/app/src/main/jni/netguard/session.c#L278-L281
To Reproduce
I don't know if the Android emulator supports MTE, but even if it does not, you should probably be able to catch this bug using the address sanitizer from the NDK
@thestinger might have some hints on how to debug this properly when you don't have a MTE capable phone available.