From 9feb8eb4a5c62d6285c8bd82010eba30cfdeafab Mon Sep 17 00:00:00 2001 From: austinbenoit Date: Wed, 25 Nov 2026 03:53:39 +0000 Subject: [PATCH] Remote Config (Android): pass blob.data() to Variant::FromMutableBlob In RemoteConfigValueToVariant(), the byte-array conversion branch passed &blob (the address of the local std::vector object on the stack) instead of blob.data() to Variant::FromMutableBlob(), causing an out-of-bounds stack read for payloads larger than sizeof(blob) and corrupting returned binary Variant values in GetAll(). --- release_build_files/readme.md | 2 ++ remote_config/src/android/remote_config_android.cc | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/release_build_files/readme.md b/release_build_files/readme.md index 4c99e1ee91..3ff3c0543b 100644 --- a/release_build_files/readme.md +++ b/release_build_files/readme.md @@ -615,6 +615,8 @@ code. ## Release Notes ### Upcoming - Changes + - Remote Config (Android): Fixed an out-of-bounds stack read when converting + byte-array config values to `Variant` in `GetAll()`. - General (Desktop): Fixed Auth and App Check staying registered with their `App` after being deleted. Previously a deleted `AppCheck` instance could be silently re-created by other products using the same `App`. diff --git a/remote_config/src/android/remote_config_android.cc b/remote_config/src/android/remote_config_android.cc index 66cf18c821..2b237d787d 100644 --- a/remote_config/src/android/remote_config_android.cc +++ b/remote_config/src/android/remote_config_android.cc @@ -1292,7 +1292,7 @@ static Variant RemoteConfigValueToVariant(JNIEnv* env, jobject from) { if (!CheckKeyRetrievalLogError(env, "", "vector")) { std::vector blob = util::JniByteArrayToVector(env, value_array); - return Variant::FromMutableBlob(&blob, blob.size()); + return Variant::FromMutableBlob(blob.data(), blob.size()); } // If get here, all conversion fails. LogError(