Skip to content
Commit f0f6d42b authored by Eric Biggers's avatar Eric Biggers
Browse files

LockSettingsService: reject null keys in setString() et al.

Make the setBoolean(), setLong(), and setString() methods of
ILockSettings throw an exception if the given key is null, rather than
allowing it to be inserted into the locksettings database, where it
previously would cause a crash upon preloading.

This is a small cleanup only; we probably should go further and use an
allowlist of key names.  Still, the ACCESS_KEYGUARD_SECURE_STORAGE
permission is required to call these methods, so there doesn't appear to
be any security impact from the lax input validation.

Bug: 261860102
Test: com.android.server.locksettings
Change-Id: Ic8632068b92182425e78e2f28a1c4016b7af4a3b
parent 96ad5160
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment