AEADBadTagException AndroidX Jetpack Security startup crash
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Ambito
- cryptography, mobile, security
Direzione di ricerca
Begin with the supplied reproducer and the Application.onCreate startup path; inspect EncryptedSharedPreferences.create, MasterKey.Builder, and the Tink v1.8.0 behavior described in the report. Done means the intermittent AEADBadTagException is explained and a verified fix or clear reproduction is recorded across the reported Android versions.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Help us help you
We're using Tink via AndroidX Jetpack Security v1.1.0-alpha06 and using the non-deprecated EncryptedSharedPreferences.create method that avoids the race condition when creating a global MasterKey.
The crash happens on: Device - Pixel 7 pro, OS - Android 14
Describe the bug:
The crash isn't consistently reproducible we have crash reports from different devices and across different Android SDK versions.
But according to this stack trace, it's happening on startup during Application.onCreate.
What was the expected behavior?
No crashes.
How can we reproduce the bug?
We're creating an EncryptedSharedPreference instance using the below snippet.
class SharedPreferencesDataSource(
context: Context,
filename: String
) {
companion object {
fun getEncryptedSharedPreferences(context: Context, filename: String) =
EncryptedSharedPreferences.create(
context,
"${filename}_secure",
getOrCreateKey(context),
EncryptedSharedPreferences.PrefKeyEncryptionScheme.AES256_SIV,
EncryptedSharedPreferences.PrefValueEncryptionScheme.AES256_GCM
)
private fun getOrCreateKey(context: Context) =
MasterKey.Builder(context, MasterKey.DEFAULT_MASTER_KEY_ALIAS)
.setKeyScheme(MasterKey.KeyScheme.AES256_GCM)
.build()
}
}
Do you have any debugging information?
I've posted a reproducer below.
What version of Tink are you using?
Jetpack Security is using Tink v 1.8.0 behind the scenes.
Can you tell us more about your development environment?
N/A
Is there anything else you'd like to add?
I've read this comment, and mentioned
a) the encrypted keyset has been modified.
b) the current master key in keystore is not the same as the master key that was used to encrypt the keyset.
I'm not sure, though, how this can be caused? We're creating EncryptedSharedPreferences instances, but we never touch the MasterKey used to encrypt the data there.
- Lingua principale
- Java
- Stelle
- 310
- Fork
- 40
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
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 tink-crypto/tink-java
-
StreamingAeadSeekableDecryptingChannel.read() never returns -1 — infinite CPU spin / hang on empty or truncated ciphertextsForse già presa @willinois l’ha presa 36 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 74/100
tink-crypto/tink-java#79 · 1 assegnatario ·
-
java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer; in InsecureNonceChaCha20Poly1305Base on JDK8Forse già presa @Sineaggi l’ha presa 165 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
tink-crypto/tink-java#68 · 13 commenti ·
-
Support registering custom key managers for user-defined primitives (or provide a migration path)Forse di nuovo libera @tholenst l’ha presa 246 giorni fa e non c’è nessuna pull request aperta. Aperta
tink-crypto/tink-java#67 · 5 commenti · 1 assegnatario ·
-
p3
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
tink-crypto/tink-java#66 · 3 commenti ·
-
p3
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
tink-crypto/tink-java#41 · 1 commento ·
Tutte le issue di tink-crypto/tink-java
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
strimzi/strimzi-kafka-operator#13328 · 1 commento · 3 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
GoogleContainerTools/jib#4538 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
OpenLiberty/ci.maven#2137 ·
I maintainer di solito rispondono entro 1 giorno
-
Payer adjustment can exceed the balance left after copay and deductible, so claim payments add up to more than the chargeForse già presa @DG47 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
synthetichealth/synthea#1772 ·
I maintainer di solito rispondono entro 13 giorni
-
bug dependencies
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100