Build conscrypt-android with NDK r29: r27d binaries trigger a Play Console 16 KB advisory
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 43/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Ambito
- build-system, mobile-dev
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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)
- Lingua principale
- Java
- Stelle
- 1.4k
- Fork
- 332
- Merge medio
- 2g 56m
- PR unite (30g)
- 5
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di google/conscrypt
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
Difficoltà 3/5 Mezza giornata Idoneità per principianti 45/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 49/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 22/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 58/100
Tutte le issue di google/conscrypt
Issue simili
-
beginner difficulty: easy documentation good first issue hacktoberfest help wanted observability size/S up-for-grabs
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
dmitriy-iliyov/spring-transactional-outbox#82 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
RamazanKara/nightjar#264 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
netty/netty#18628 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 87/100
apache/flink-agents#1500 ·
I maintainer di solito rispondono entro 1 giorno
-
bug frontend
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
sylvainmetayer/planning-equipes#495 ·
I maintainer di solito rispondono entro 1 giorno