chore: upgrade to 9.2.3-exodus.0 for RN 0.85#5
Open
raxodus wants to merge 7 commits into
Open
Conversation
Port padding fix to Kotlin implementation. Some devices/ciphers leave PKCS7 padding in the decrypted bytes, which corrupts the output. This adds a maybeRemovePKCS7Padding helper that validates and strips the padding when present. Original fix: 83a3359
Remove the deprecated Facebook Conceal cipher storage implementation. Facebook Conceal was archived in March 2020 and is no longer maintained. Changes: - Remove CipherStorageFacebookConceal.kt - Remove conceal dependency from build.gradle - Remove FB cipher from KnownCiphers annotation and init - Remove auto-upgrade logic for FB cipher in getGenericPassword - Remove FB fallback in DataStorePrefsStorage - Remove FB from STORAGE_TYPE enum in TypeScript - Update docs and tests to remove all Facebook Conceal references
Scope package to @Exodus namespace and set version to 9.2.3-exodus.0 for use as an Exodus fork dependency.
AES-GCM is a one way street, once it's been rolled out to users, there's no going back. It's potentially a high risk change, let's roll this out in stages. First all the other changes that should be compatible with our older v4.x.x release and then consider re-enabling this.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rebase of Exodus patches onto upstream react-native-keychain v9.2.3 (from old v4.x-based fork).
Part of the RN 0.85 upgrade: ExodusMovement/exodus-mobile#38221.
Exodus Patches
bc221b8abc7e01a5484e0Upstream Changelog (v4.x → v9.2.3)
The v4.x→v9.x span represents a near-complete rewrite of the library:
kSecAttrAccessibleAlwaysThisDeviceOnly, addedgetAllGenericPasswordServices, migrated build config.authenticationPrompthandling.hasGenericPasswordAPI, builder-bob build toolchain replacing the old native module scaffolding.STORAGE_TYPE.AESrenamed toAES_CBCwith deprecation shim,hasInternetCredentialssignature changed to accept an options object,resetInternetCredentialslikewise. SharedPreferences storage backend replaced withandroidx.datastore:datastore-preferences:1.1.1(with automatic SharedPreferences migration). NewCipherStorageKeystoreAesGcmadded (both biometric-auth and no-auth variants), aMutexadded to serialize all cipher operations, and theDecryptionResultHandlerabstraction generalised toResultHandler(covering both encrypt and decrypt flows). iOS gainedcloudSync/ iCloud Keychain sync support.PackageManagerinstead of runtime probe), key-algorithm compatibility check added toextractGeneratedKey,hasCredentialsWithSecClasshelper on iOS refactored to deduplicatehasGenericPassword/hasInternetCredentials. Parallel set/get race condition fixed with the Mutex (v9.2.0 / v9.2.1).IllegalBlockSizeExceptionon Android decrypt fixed (v9.2.1).authenticationPromptdefault value added forSetOptions(v9.2.2). FacebookConceal entity prefix spacing reverted for backward-compat (v9.2.3).Security Audit of Upstream Changes
Prototype Pollution Vectors
No prototype pollution vectors found. The JS/TS layer (
normalizeOptions.ts,enums.ts,index.ts) uses plain object spread ({ ...options }) with typed inputs. No dynamic property assignment via bracket notation on prototypes. All user-supplied strings are passed to the native layer via typed React Native bridge calls, not used as property keys.Command Injection
No shell execution in the library itself. The only
cp.spawnSync('adb', ...)calls are in the Detox e2e test helpers (KeychainExample/e2e/) and are not part of the shipped library. NoRuntime.exec,ProcessBuilder, orNSTaskusage was found in any production Android or iOS code.Network Requests
No outbound network requests. The library is entirely local: it reads and writes to the Android Keystore / DataStore and iOS Keychain. No
HttpURLConnection,OkHttp,NSURLSession, orfetchcalls are present in any production source file. The only URLs in the diff are comment references to GitHub issues and documentation links.Binary Blobs / Non-reproducible Artifacts
The
android/gradle/wrapper/gradle-wrapper.jarbinary is present in the repository (as is standard for Gradle projects). A SHA-256 comparison between v9.0.0 and v9.2.3 shows the jar is identical. No new.aar,.so,.dylib, or other binary blobs were added in the v9.0.0→v9.2.3 range.ReDoS Patterns
No complex or backtracking regexes added. The only new regex patterns in the diff are simple anchored test-assertion patterns in Detox e2e specs, which are not part of the library runtime. The Kotlin
split("/")[1]call on a static transformation string inisKeyAlgorithmSupportedis a fixed-input split with no regex.Unsafe Dynamic Code Execution
No
eval,new Function,ClassLoader/forName/getMethodreflection abuse,dlopen/dlsym, or JavaScriptWebVieweval found. All cipher operations go through the Android Keystore JCA provider and iOS Security framework—no custom crypto implementations.New Dependencies
Android (build.gradle):
androidx.datastore:datastore-preferences:1.1.1— Google's official replacement for SharedPreferences. Apache 2.0 licensed. No network access; purely local storage. Added to replaceSharedPreferencesas the encrypted-entry backing store, with automatic migration.JavaScript/TypeScript: No new runtime
dependenciesadded.devDependenciesare dev-only toolchain packages unchanged between versions.iOS: No new CocoaPods dependencies.
Findings Summary
androidx.datastore:1.1.1(well-known Google library)Test Plan
src/package.jsonin exodus-mobile-upgrade worktreeyarn ios:basebuildsyarn android:basebuilds