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

Crashes due to seccomp in Android x86 emulator #2336

Closed
link2xt opened this issue May 30, 2024 · 2 comments
Closed

Crashes due to seccomp in Android x86 emulator #2336

link2xt opened this issue May 30, 2024 · 2 comments

Comments

@link2xt
Copy link
Contributor

link2xt commented May 30, 2024

There is an attempt to use iroh 0.17.0 for realtime channels on Android at deltachat/deltachat-android#3108

It crashes in emulator:
deltachat/deltachat-android#3108 (comment)

Larger log from the emulator:

30 14:03:58.635 8160-8160 tokio-runtime-w com.b44t.messenger.beta W type=1400 audit(0.0:780): avc: denied { read } for name="arp" dev="proc" ino=4026532043 scontext=u:r:untrusted_app:s0:c146,c256,c512,c768 tcontext=u:object_r:proc_net:s0 tclass=file permissive=0 app=com.b44t.messenger.beta
2024-05-30 14:03:58.635 8160-8160 tokio-runtime-w com.b44t.messenger.beta W type=1400 audit(0.0:781): avc: denied { read } for name="route" dev="proc" ino=4026532046 scontext=u:r:untrusted_app:s0:c146,c256,c512,c768 tcontext=u:object_r:proc_net:s0 tclass=file permissive=0 app=com.b44t.messenger.beta
2024-05-30 14:03:58.635 8160-8160 tokio-runtime-w com.b44t.messenger.beta W type=1400 audit(0.0:782): avc: denied { read } for name="ipv6_route" dev="proc" ino=4026532560 scontext=u:r:untrusted_app:s0:c146,c256,c512,c768 tcontext=u:object_r:proc_net:s0 tclass=file permissive=0 app=com.b44t.messenger.beta
2024-05-30 14:03:58.635 8160-8160 tokio-runtime-w com.b44t.messenger.beta W type=1400 audit(0.0:783): avc: denied { search } for name="net" dev="sysfs" ino=4051 scontext=u:r:untrusted_app:s0:c146,c256,c512,c768 tcontext=u:object_r:sysfs_net:s0 tclass=dir permissive=0 app=com.b44t.messenger.beta
2024-05-30 14:03:58.635 8160-8160 tokio-runtime-w com.b44t.messenger.beta W type=1400 audit(0.0:784): avc: denied { search } for name="net" dev="sysfs" ino=4051 scontext=u:r:untrusted_app:s0:c146,c256,c512,c768 tcontext=u:object_r:sysfs_net:s0 tclass=dir permissive=0 app=com.b44t.messenger.beta
2024-05-30 14:03:58.759 8160-8197 libc com.b44t.messenger.beta A Fatal signal 31 (SIGSYS), code 1 (SYS_SECCOMP) in tid 8197 (tokio-runtime-w), pid 8160 (.messenger.beta)
2024-05-30 14:03:58.635 8160-8160 chatty com.b44t.messenger.beta I uid=10146(com.b44t.messenger.beta) identical 3 lines
2024-05-30 14:03:58.635 8160-8160 tokio-runtime-w com.b44t.messenger.beta W type=1400 audit(0.0:788): avc: denied { search } for name="net" dev="sysfs" ino=4051 scontext=u:r:untrusted_app:s0:c146,c256,c512,c768 tcontext=u:object_r:sysfs_net:s0 tclass=dir permissive=0 app=com.b44t.messenger.beta
2024-05-30 14:03:58.817 8788-8788 DEBUG crash_dump32 A pid: 8160, tid: 8197, name: tokio-runtime-w >>> com.b44t.messenger.beta <<<
2024-05-30 14:03:58.818 8788-8788 DEBUG crash_dump32 A #02 pc 00db5680 /data/app/com.b44t.messenger.beta-VMaQurdwAW8xrf01HE6OsQ==/lib/x86/libnative-utils.so (BuildId: 7c3071b7147160a05e156755470bd2f5b9dfd42b)
2024-05-30 14:03:58.818 8788-8788 DEBUG crash_dump32 A #03 pc 00d8223e /data/app/com.b44t.messenger.beta-VMaQurdwAW8xrf01HE6OsQ==/lib/x86/libnative-utils.so (BuildId: 7c3071b7147160a05e156755470bd2f5b9dfd42b)
2024-05-30 14:03:58.818 8788-8788 DEBUG crash_dump32 A #04 pc 00d86256 /data/app/com.b44t.messenger.beta-VMaQurdwAW8xrf01HE6OsQ==/lib/x86/libnative-utils.so (BuildId: 7c3071b7147160a05e156755470bd2f5b9dfd42b)
2024-05-30 14:03:58.818 8788-8788 DEBUG crash_dump32 A #05 pc 00d9458e /data/app/com.b44t.messenger.beta-VMaQurdwAW8xrf01HE6OsQ==/lib/x86/libnative-utils.so (BuildId: 7c3071b7147160a05e156755470bd2f5b9dfd42b)
2024-05-30 14:03:58.818 8788-8788 DEBUG crash_dump32 A #06 pc 00d942a0 /data/app/com.b44t.messenger.beta-VMaQurdwAW8xrf01HE6OsQ==/lib/x86/libnative-utils.so (BuildId: 7c3071b7147160a05e156755470bd2f5b9dfd42b)
2024-05-30 14:03:58.818 8788-8788 DEBUG crash_dump32 A #07 pc 00d8e321 /data/app/com.b44t.messenger.beta-VMaQurdwAW8xrf01HE6OsQ==/lib/x86/libnative-utils.so (BuildId: 7c3071b7147160a05e156755470bd2f5b9dfd42b)
2024-05-30 14:03:58.818 8788-8788 DEBUG crash_dump32 A #08 pc 0100fadc /data/app/com.b44t.messenger.beta-VMaQurdwAW8xrf01HE6OsQ==/lib/x86/libnative-utils.so (BuildId: 7c3071b7147160a05e156755470bd2f5b9dfd42b)
2024-05-30 14:03:58.818 8788-8788 DEBUG crash_dump32 A #09 pc 0100e56d /data/app/com.b44t.messenger.beta-VMaQurdwAW8xrf01HE6OsQ==/lib/x86/libnative-utils.so (BuildId: 7c3071b7147160a05e156755470bd2f5b9dfd42b)
2024-05-30 14:03:58.818 8788-8788 DEBUG crash_dump32 A #10 pc 00a4006a /data/app/com.b44t.messenger.beta-VMaQurdwAW8xrf01HE6OsQ==/lib/x86/libnative-utils.so (BuildId: 7c3071b7147160a05e156755470bd2f5b9dfd42b)
2024-05-30 14:03:58.818 8788-8788 DEBUG crash_dump32 A #11 pc 0100cd10 /data/app/com.b44t.messenger.beta-VMaQurdwAW8xrf01HE6OsQ==/lib/x86/libnative-utils.so (BuildId: 7c3071b7147160a05e156755470bd2f5b9dfd42b)
2024-05-30 14:03:58.818 8788-8788 DEBUG crash_dump32 A #12 pc 0100c971 /data/app/com.b44t.messenger.beta-VMaQurdwAW8xrf01HE6OsQ==/lib/x86/libnative-utils.so (BuildId: 7c3071b7147160a05e156755470bd2f5b9dfd42b)
2024-05-30 14:03:58.818 8788-8788 DEBUG crash_dump32 A #13 pc 01012dd5 /data/app/com.b44t.messenger.beta-VMaQurdwAW8xrf01HE6OsQ==/lib/x86/libnative-utils.so (BuildId: 7c3071b7147160a05e156755470bd2f5b9dfd42b)
2024-05-30 14:03:58.818 8788-8788 DEBUG crash_dump32 A #14 pc 00ffc523 /data/app/com.b44t.messenger.beta-VMaQurdwAW8xrf01HE6OsQ==/lib/x86/libnative-utils.so (BuildId: 7c3071b7147160a05e156755470bd2f5b9dfd42b)
2024-05-30 14:03:59.503 2021-2133 InputDispatcher system_process E channel 'b0e7b2a com.b44t.messenger.beta/org.thoughtcrime.securesms.WebxdcActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
2024-05-30 14:03:59.504 2021-2133 InputDispatcher system_process E channel '8c15b80 com.b44t.messenger.beta/org.thoughtcrime.securesms.ConversationActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
2024-05-30 14:03:59.645 8806-8806 .messenger.bet com.b44t.messenger.beta I Late-enabling -Xcheck:jni
2024-05-30 14:03:59.689 8806-8806 .messenger.bet com.b44t.messenger.beta E Unknown bits set in runtime_flags: 0x8000
2024-05-30 14:03:59.691 8806-8806 .messenger.bet com.b44t.messenger.beta W Unexpected CPU variant for X86 using defaults: x86

There is no system call number found anywhere in the logs even though it is expected according to https://source.android.com/docs/core/tests/debug/native-crash#seccomp

Maybe running dumbpipe in termux in emulator can be tried to debug this.

I suspect that it is related to netdev crate, at least it does not make sense to try accessing /proc/net/arp like on normal Linux if it is not allowed on Androids anyway.

@link2xt
Copy link
Contributor Author

link2xt commented May 31, 2024

Update: in x86_64 emulator it works, the problem is only in x86 (32-bit) emulator.

@ramfox ramfox moved this to 📋 Backlog in iroh Jun 6, 2024
@link2xt
Copy link
Contributor Author

link2xt commented Nov 5, 2024

Probably caused by quinn-rs/quinn#1947 and should not happen anymore, better open a new issue if similar problem appears later.

@link2xt link2xt closed this as not planned Won't fix, can't repro, duplicate, stale Nov 5, 2024
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in iroh Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

2 participants