Skip to content

Opt-in to Arm MTE for debug and daily#9820

Merged
wmontwe merged 1 commit intothunderbird:mainfrom
thgoebel:mte
Nov 5, 2025
Merged

Opt-in to Arm MTE for debug and daily#9820
wmontwe merged 1 commit intothunderbird:mainfrom
thgoebel:mte

Conversation

@thgoebel
Copy link
Contributor

This is an easy security improvement (at least for users with Google Pixel 8 and later, which have the hardware for MTE).

TFA doesn't have any explicit native code afaik, but there are some .so files in the APK (from Compose?), and also Android framework code that TFA calls might have native code. All of that runs in the app's process, so opting in to MTE will cover that. TFA parses attacker controlled data (emails), so enabling MTE is an easy defense-in-depth.

I've been running TFA on a Pixel 8a with GrapheneOS and MTE force-enabled for a few months now without any issues.
Still, I recommend you to test this again on an MTE-compatible device (Pixel 8 and later), just to be sure :)

For background on MTE, see:

@asoucar
Copy link
Contributor

asoucar commented Sep 22, 2025

Thanks for bringing this up. @wmontwe @rafaeltonholo I'd like to add this to a meeting or thread to discuss since security related work should probably get more eyes.

@asoucar
Copy link
Contributor

asoucar commented Oct 22, 2025

Thanks for bringing this to our attention. After some discussion with @wmontwe we don't currently have the testing bandwidth to safely enable this. We believe this should be fairly extensively tested before we'd be comfortable including the MTE changes in the app. I'm going to leave this PR up so that once we feel we can sufficiently test that it is top of mind.

@wmontwe
Copy link
Member

wmontwe commented Nov 3, 2025

@thgoebel We don't have test devices with GrapheneOS to verify these changes. But we could add this setting to the develop and daily version of Thunderbird. It would require to update the manifest files within app-thunderbird/src/debug/ and app-thunderbird/src/daily/ instead of the one within app-common/src/main.

If there are any volunteers in the community with GrapheneOS, they could help by testing our daily version for compatibility, once this patch was merged. If there is positive feedback we could enable it for all versions.

What do you think?

@thgoebel
Copy link
Contributor Author

thgoebel commented Nov 3, 2025

Sounds good, I moved the manifest tag to debug and daily.

Note that with this change, you don't need GrapheneOS, you only need a Pixel 8 or later. This change works on any ROM, including stock.

GrapheneOS is only relevant because it allows users to force-enable MTE for apps where the developer has not opted in via the manifest. This is how I'm using all my apps (including Thunderbird).

In the past year I have seen basically no crashes, only in two apps (Proton Mail and Apple Music).
Fwiw, an MTE-induced crash is a memory bug that should be fixed anyway. MTE just makes those bugs visible, instead of silently corrupting the memory (and potentially crashing much later due to to that initial corrupution).

TLDR: By opting in via the manifest, any community member with a Pixel 8 or later can test MTE (on debug/daily), no matter which ROM they are using. Rolling it out to daily first (and later beta?) makes sense.

@wmontwe
Copy link
Member

wmontwe commented Nov 5, 2025

Sounds good, I moved the manifest tag to debug and daily.

Note that with this change, you don't need GrapheneOS, you only need a Pixel 8 or later. This change works on any ROM, including stock.

GrapheneOS is only relevant because it allows users to force-enable MTE for apps where the developer has not opted in via the manifest. This is how I'm using all my apps (including Thunderbird).

In the past year I have seen basically no crashes, only in two apps (Proton Mail and Apple Music). Fwiw, an MTE-induced crash is a memory bug that should be fixed anyway. MTE just makes those bugs visible, instead of silently corrupting the memory (and potentially crashing much later due to to that initial corrupution).

TLDR: By opting in via the manifest, any community member with a Pixel 8 or later can test MTE (on debug/daily), no matter which ROM they are using. Rolling it out to daily first (and later beta?) makes sense.

Thanks for the detailed explanation. Then I could use my Pixel 9 to test daily. When this results in a stable experience, we could enable MTE for beta and test with a larger audience.

I created a ticket to keep track of these changes: #10053

@wmontwe wmontwe linked an issue Nov 5, 2025 that may be closed by this pull request
@wmontwe wmontwe requested review from wmontwe and removed request for asoucar November 5, 2025 07:49
@wmontwe wmontwe changed the title Opt-in to Arm MTE Opt-in to Arm MTE for debug and daily Nov 5, 2025
Copy link
Member

@wmontwe wmontwe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@wmontwe wmontwe merged commit b45ed55 into thunderbird:main Nov 5, 2025
13 checks passed
@thunderbird-botmobile
Copy link
Contributor

Thanks for your contribution! Your pull request has been merged and will be part of Thunderbird 15. We appreciate the time and effort you put into improving Thunderbird. If you haven’t already, you’re welcome to join our Matrix chat for contributors. It’s where we discuss development and help each other out. https://matrix.to/#/#tb-android-dev:mozilla.org
Hope to see you there! 🚀📱🐦

@thunderbird-botmobile thunderbird-botmobile bot added this to the Thunderbird 15 milestone Nov 5, 2025
@thgoebel thgoebel deleted the mte branch November 5, 2025 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable MTE for daily and debug

3 participants