PhilippC / keepass2android

Password manager app for Android
https://play.google.com/store/apps/details?id=keepass2android.keepass2android
GNU General Public License v3.0
4.79k stars 387 forks source link

[BUG] Usage of dynamic code loading (DCL) from memory #2690

Closed bratkartoffel closed 3 days ago

bratkartoffel commented 4 days ago

Checks

Describe the bug you encountered:

I'm using GrapheneOs and toggled the "disable dynamic code loading (DCL) from memory" feature. With this setting enabled, Keepass2Android fails to start and crashes instantly:

type: crash
osVersion: google/lynx/lynx:14/AP2A.240905.003/2024101200:user/release-keys
flags: dev options enabled
package: keepass2android.keepass2android_nonet:197
process: keepass2android.keepass2android_nonet
installer: com.aurora.store

signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0000000000000010

backtrace:
      #00 pc 00000000000f5528  /data/app/~~zkVkckdW6dNsF8sS82k1dw==/keepass2android.keepass2android_nonet-rCsch44jxbwXeGQ-Q3WwPQ==/lib/arm64/libmonosgen-2.0.so (mono_arch_create_sdb_trampoline+92)

The application works fine if I disable this protection.

Describe what you expected to happen:

App should work fine without dynamic code loading from memory. This feature provides an additional way to harden apps and should not cause issues with a security sensitive app.

What version of Keepass2Android are you using?

1.09e-r7

Which version of Android are you on?

Android 14 / GrapheneOS 2024101200

PhilippC commented 3 days ago

"my" source code doesn't do anything that could be called dynamic code loading. However, the app is built using Xamarin which basically involves running a .net runtime within the app. This certainly involves many dirty tricks to get it on Android, but I cannot change this (without rewriting the app completely using a different language and build system). So I am closing this.

bratkartoffel commented 2 days ago

Thank you for taking a look into this. I already suspected the framework to be resposible for this behaviour. Keep up the great work!