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

未关闭
#244 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
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 分钟
30 天内合并 PR
34

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

CommandLineCoding/Elephant 的其他 Issue

查看 CommandLineCoding/Elephant 的全部 Issue

相似的 Issue

更多 Dart Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。