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

オープン
#244 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
52/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
android, dart, flutter, github-actions
領域
ci-cd, mobile, security

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Dart
スター
9
フォーク
5
平均マージ
49分
マージ済み PR(30日)
34

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

CommandLineCoding/Elephant のほかの issue

CommandLineCoding/Elephant の issue をすべて見る

似ている issue

Dart の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。