[BUG]: libwebcrypto.so isn't 16 KB page aligned

Aperta
#244 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
52/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
android, dart, flutter, github-actions
Ambito
ci-cd, mobile, security

Direzione di ricerca

Start with mobile/pubspec.lock to trace the webcrypto, webpush_encryption, and unifiedpush versions, then inspect .github/workflows/android-release.yaml for the Android build checks. Check libwebcrypto.so with readelf -lW and test loading or push decryption on the 16 KB Android emulator. Done means its PT_LOAD alignment is at least 0x4000 and CI checks every .so.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area: mobile bug difficulty: medium

Context

Android devices with 16 KB memory pages (some Android 15+ devices, and the 16 KB emulator images) can only load native libraries whose ELF LOAD segments are aligned to at least 16 KB.

Checking a release APK built from main (arm64-v8a):

Library LOAD alignment
libapp.so, libflutter.so 64 KB
libdartjni.so, libdatastore_shared_counter.so, libsqlcipher.so 16 KB
libwebcrypto.so 4 KB

The zip alignment (zipalign -c -P 16) passes; only libwebcrypto.so fails. It comes from webcrypto 0.6.0, pulled in by unifiedpush → webpush_encryption, so it is new with push notifications (#204).

What to do

  • Find out when libwebcrypto.so is loaded (at start-up, or only when a push message is decrypted) and what happens on a 16 KB device: crash, or notifications silently failing.
  • Try webcrypto 0.6.1 (the latest) and check its alignment; otherwise look at a newer webpush_encryption / unifiedpush, or report it upstream.
  • Add an alignment check for every .so to CI, so this can't come back unnoticed.

Where to look

mobile/pubspec.lock (webcrypto, webpush_encryption), .github/workflows/android-release.yaml.

Good to know

To check a library: read the p_align of its PT_LOAD program headers (readelf -lW lib.so); it must be 0x4000 or more. Test on the "16 KB page size" Android emulator image.

Lingua principale
Dart
Stelle
9
Fork
5
Merge medio
49m
PR unite (30g)
34

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di CommandLineCoding/Elephant

Tutte le issue di CommandLineCoding/Elephant

Issue simili

Altre issue su Dart

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.