Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 562ea603 authored by Ellen Arteca's avatar Ellen Arteca
Browse files

Mitigate LSKF leaks in RecoverableKeyStoreManager

This CL clears a local variable `byte[]` storing a copy of the
LSKF, to avoid it being present in a RAMdump.

Bug: 320392352
Test: build
Change-Id: I3781ad8c0a15b7761820a21413cb870e01794c37
parent 548ee385
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1082,7 +1082,8 @@ public class RecoverableKeyStoreManager {
            int keyguardCredentialsType = lockPatternUtilsToKeyguardType(savedCredentialType);
            try (LockscreenCredential credential =
                    createLockscreenCredential(keyguardCredentialsType, decryptedCredentials)) {
                // TODO(b/254335492): remove decryptedCredentials
                Arrays.fill(decryptedCredentials, (byte) 0);
                decryptedCredentials = null;
                VerifyCredentialResponse verifyResponse =
                        lockSettingsService.verifyCredential(credential, userId, 0);
                return handleVerifyCredentialResponse(verifyResponse, userId);