Skip to content

Crash on GrapheneOS with MTE enabled: SEGV_MTESERR in libgocryptfs_jni.so #399

Description

@userT05

Environment

  • Device: Pixel 9 Pro XL
  • OS: GrapheneOS (Android 16 / BP4A.260205.002)
  • Security Features: Hardware MTE (Memory Tagging Extension) Enabled

Description

DroidFS crashes consistently when attempting to list or open encrypted directories. The crash is triggered by an MTE mismatch (Memory Tagging Extension violation), which suggests a memory safety issue in the native Go-based libraries when interacting with the JNI layer on ARMv9 hardware.

Crash Log Snippet

Type: Crash Report
Package: sushi.hardcore.droidfs
Signal: 11 (SIGSEGV), code 9 (SEGV_MTESERR)
MTE: enabled

Backtrace:
/lib/arm64/libgocryptfs_jni.so (native_list_dir)
/oat/arm64/base.odex (sushi.hardcore.droidfs.filesystems.GocryptfsVolume.readDir)
/oat/arm64/base.odex (sushi.hardcore.droidfs.explorers.BaseExplorerActivity.setCurrentPath)
/apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub)

Additional Note

The app works fine if MTE is disabled for this specific package in GrapheneOS settings, but crashes immediately when MTE is active. This backtrace points to the JNI call for gocryptfs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions