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

Ouverte
#244 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
52/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
Active
Stack technique
android, dart, flutter, github-actions
Domaine
ci-cd, mobile, security

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.

Langage dominant
Dart
Étoiles
9
Forks
5
Merge moyen
49 min
PR mergées (30 j)
34

Préparer son environnement

  • Fournit un Dockerfile ou un fichier Docker Compose
  • Aucun modèle de pull request
  • Aucun guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de CommandLineCoding/Elephant

Toutes les issues de CommandLineCoding/Elephant

Issues similaires

Plus d'issues Dart

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.