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

Offen
#244 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
52/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
android, dart, flutter, github-actions
Bereich
ci-cd, mobile, security

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
Dart
Sterne
9
Forks
5
Ø Merge
49 Min.
Gemergte PRs (30 T.)
34

Entwicklungsumgebung

  • Enthält ein Dockerfile oder eine Docker-Compose-Datei
  • Keine Pull-Request-Vorlage
  • Kein Beitragsleitfaden

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus CommandLineCoding/Elephant

Alle Issues in CommandLineCoding/Elephant

Ähnliche Issues

Weitere Issues zu Dart

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.