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

Commit 53738cf5 authored by Ellen Arteca's avatar Ellen Arteca
Browse files

Update arguments to vold binder to use byte[] secret for CE storage

We have replaced the current `string secret` argument to the lock/unlock of
CE storage with a `byte[]`. This is part of an effort to remove instances
of the LSKF and LSKF-derived secrets that are available in a RAMdump.

This CL is the propagation of this argument change to the binder invocation
in the StorageManagerService.

Bug: 320392352
Test: see Icd4c925f2fd79e7533fdf9027e16f6736dbe1ab3
Change-Id: Ibef6da208302c6a0b47f33f947f8bf8ea55eaa35
parent d666832c
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -146,7 +146,6 @@ import com.android.internal.os.FuseUnavailableMountException;
import com.android.internal.os.SomeArgs;
import com.android.internal.util.ArrayUtils;
import com.android.internal.util.DumpUtils;
import com.android.internal.util.HexDump;
import com.android.internal.util.IndentingPrintWriter;
import com.android.internal.util.Preconditions;
import com.android.modules.utils.TypedXmlPullParser;
@@ -3270,7 +3269,7 @@ class StorageManagerService extends IStorageManager.Stub
            throws RemoteException {
        super.setCeStorageProtection_enforcePermission();

        mVold.setCeStorageProtection(userId, HexDump.toHexString(secret));
        mVold.setCeStorageProtection(userId, secret);
    }

    /* Only for use by LockSettingsService */
@@ -3280,7 +3279,7 @@ class StorageManagerService extends IStorageManager.Stub
        super.unlockCeStorage_enforcePermission();

        if (StorageManager.isFileEncrypted()) {
            mVold.unlockCeStorage(userId, HexDump.toHexString(secret));
            mVold.unlockCeStorage(userId, secret);
        }
        synchronized (mLock) {
            mCeUnlockedUsers.append(userId);