Build conscrypt-android with NDK r29: r27d binaries trigger a Play Console 16 KB advisory
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 43/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- build-system, mobile-dev
Hướng nghiên cứu
Start by reading #1517 and tracing the Android native build and release configuration that selects the NDK for the published artifacts. Check whether NDK r29 is supported by the project’s build and release tooling, then build the Android artifacts and inspect their NDK identifiers. Done means the published native libraries use r29 and the Play Console advisory is cleared; the issue does not name build files or tests.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
Google Play Console shows a "Technical quality" advisory for apps shipping conscrypt-android, because the published libconscrypt_jni.so binaries are built with NDK r27d and Play's checker requires r28 or higher.
Since r29 is a supported NDK release (per the same policy used to pick r27d in #1517), building the Android artifacts with r29 would clear the advisory without departing from the "only supported toolchains" rule.
What Play Console reports
For an app shipping Conscrypt 2.5.3:
Your app could crash on 16 KB devices
Your app is compiled for 16 KB devices, but some of its libraries were compiled
using an older Android NDK version that can still cause crashes. The following
libraries in your app may be affected:
base/lib/arm64-v8a/libconscrypt_jni.so
To fix this issue, choose one of the following:
- Upgrade to NDK r28 or higher to resolve this automatically.
- Recompile your libraries and manually enable linker flags if you can't upgrade.
If your code relies on the PAGE_SIZE macro, you must replace all instances.
Play keys this off the NDK identifier in .note.android.ident, not off segment alignment.
What the published artifacts contain
Checked with readelf on jni/arm64-v8a/libconscrypt_jni.so from each Maven Central AAR:
| Version | .note.android.ident |
LOAD p_align | PT_GNU_RELRO |
|---|---|---|---|
| 2.5.3 | r21d | 0x4000 | start 0x1ecc20, memsz 0x163e0, end 0x203000 — not 16 KB aligned, not a suffix of its LOAD |
| 2.6.0 | r27d | 0x4000 | 16 KB aligned suffix |
| 2.6.3 | r27d | 0x4000 | start 0x2a3870, memsz 0x18790, end 0x2bc000 — 16 KB aligned suffix |
| 2.7.0 | r27d | 0x4000 | 16 KB aligned suffix |
| 2.8.0 | r27d | 0x4000 | 16 KB aligned suffix |
So 2.6.x genuinely fixed the RELRO defect that Android Studio's "All ELF Alignment Problems" check reports against 2.5.3 (the figures in the last comments of #1413 match the 2.5.3 row above exactly). That part is resolved and we are upgrading because of it.
The remaining gap is only the toolchain identifier: r27d is correct and 16 KB safe, but Play's check compares the number against r28 and reports the advisory anyway.
Why r29 rather than r28
In #1517, @juergw explained the move from r28 back to r27:
We decided that we don't want to use an unsupported toolchain to generate these binaries, because unsupported tools may contain unfixed bugs. Therefore, we decided to use the oldest tool that is still supported, which is v27.
That reasoning rules out r28, which is not in the supported set. It does not rule out r29, which is listed as supported alongside r27d and r30beta1. Building with r29 would satisfy both constraints at once: a supported toolchain, and an identifier that Play's r28-or-higher comparison accepts.
If there is a reason r29 is unsuitable (API level floor, BoringSSL compatibility, release tooling), it would be useful to have that stated here, since every app shipping Conscrypt currently inherits a Play advisory it cannot resolve on its own.
Impact on app developers
The advisory is not a release blocker today, but it appears on every upload and cannot be cleared by any action on the app side, since no published Conscrypt release uses r28 or higher. The practical options for an app are to ignore it indefinitely, exclude Conscrypt (which changes TLS behaviour on older API levels), or maintain a private build — all of which are worse than Conscrypt shipping an r29 binary.
Environment
org.conscrypt:conscrypt-android, Maven Central releases 2.5.3 through 2.8.0- Android app, minSdk 26, arm64-v8a / armeabi-v7a / x86 / x86_64
- Related: #1212, #1413 (16 KB alignment), #1517 (NDK r28 to r27 revert)
- Ngôn ngữ chính
- Java
- Star
- 1.4k
- Fork
- 332
- Merge trung bình
- 2 ngày 56 phút
- Pull request đã merge (30 ngày)
- 5
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của google/conscrypt
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 45/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 49/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 22/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
Tất cả issue của google/conscrypt
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
new admin: minor issuesĐang mởadmin area
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
alfio-event/alf.io#1556 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
dependency-review: cross-line creation PRs trip the older line's pinned toolchain advisories (issue #30 allow-list, first instance)Có thể đã có người làm @Yash200531 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
HexaHexes/neoforge-mod-template#131 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày