Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App crashes on launch due to DCL via memory error #100

Open
An-anonymous-coder opened this issue Dec 4, 2024 · 1 comment
Open

App crashes on launch due to DCL via memory error #100

An-anonymous-coder opened this issue Dec 4, 2024 · 1 comment

Comments

@An-anonymous-coder
Copy link

Describe the bug
Celestia will immediately crash as soon as it is opened because of a DCL via memory error.

To Reproduce
Steps to reproduce the behavior:

  1. Open Settings
  2. Go to Apps > Celestia > Dynamic code loading via memory
  3. Toggle the setting to "Restricted"
  4. Open Celestia

The app will immediately crash with the following error:

type: memory_DCL
osVersion: google/shiba/shiba:15/AP3A.241105.007/2024120200:user/release-keys
flags: dev options enabled
package: space.celestia.mobilecelestia:580, targetSdk 35

package: space.celestia.mobilecelestia:580

DCL denial type: InMemoryDexFile
process: space.celestia.mobilecelestia
thread: main

java.lang.SecurityException
	at android.ext.dcl.DynCodeLoading.checkInMemoryDexFileOpen(DynCodeLoading.java:82)
	at dalvik.system.DexFile.openInMemoryDexFilesNative(Native Method)
	at dalvik.system.DexFile.openInMemoryDexFiles(DexFile.java:428)
	at dalvik.system.DexFile.<init>(DexFile.java:136)
	at dalvik.system.DexPathList.initByteBufferDexPath(DexPathList.java:264)
	at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:226)
	at dalvik.system.InMemoryDexClassLoader.<init>(InMemoryDexClassLoader.java:40)
	at dalvik.system.InMemoryDexClassLoader.<init>(InMemoryDexClassLoader.java:52)
	at dalvik.system.InMemoryDexClassLoader.<init>(InMemoryDexClassLoader.java:63)
	at space.celestia.celestia.Renderer.c_start(Native Method)
	at space.celestia.celestia.Renderer.start(SourceFile:6)
	at space.celestia.celestia.Renderer.startConditionally(SourceFile:6)
	at space.celestia.mobilecelestia.celestia.s.E(SourceFile:154)
	at J0.z.R(SourceFile:26)
	at J0.Z.f(SourceFile:180)
	at J0.Z.k(SourceFile:147)
	at J0.S.A(SourceFile:1162)
	at J0.S.S(SourceFile:82)
	at J0.S.z(SourceFile:173)
	at B0.e.run(SourceFile:915)
	at android.os.Handler.handleCallback(Handler.java:959)
	at android.os.Handler.dispatchMessage(Handler.java:100)
	at android.os.Looper.loopOnce(Looper.java:232)
	at android.os.Looper.loop(Looper.java:317)
	at android.app.ActivityThread.main(ActivityThread.java:8744)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
	at com.android.internal.os.ExecInit.main(ExecInit.java:50)
	at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
	at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:369)

Expected behavior
The app should not attempt to perform DCL via memory, and should not crash.

Mobile:

  • Android version: Android 15 (AP3A.241105.007)
  • Custom Android distribution: GrapheneOS 2024120200
  • Device: Google Pixel 8
  • Version: 1.7.10 (versionCode 580)
  • Installation method: Google Play (Aurora Store)

Additional context

GrapheneOS is a privacy and security focused custom Android distribution. It includes per-app toggles to disable DCL via memory and DCL via storage. Dynamic Code Loading (DCL) is an opt-in security feature, used to protect against exploitation as explained here and here. Android applications should not use Dynamic Code Loading as a best-practice. Aurora Store is a frontend for the Google Play Store, which allows you to obtain Google Play apps without logging in to a Google account.

@levinli303
Copy link
Collaborator

I'm not sure why it is loading InMemoryDexFile in the call stack space.celestia.celestia.Renderer.c_start just calls a native method in .so it does not seem to involve loading InMemoryDexFile.

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

No branches or pull requests

2 participants