Do not require fs-verity built-in signature

There are use cases where fs-verity without signature is helpful. Relax
the restriction. Existing use cases (other than work-in-progress
features) of fs-verity in AOSP has been migrated to signature check in
userspace.

Bug: 249158715
Test: CtsAppSecurityHostTestCases:android.appsecurity.cts.ApkVerityInstallTest
Ignore-AOSP-First: Security implication requires some change in frameworks/base
Change-Id: I6b7d7143485ad304d4aa7e8a924d32d558540b92
Merged-In: I6b7d7143485ad304d4aa7e8a924d32d558540b92
This commit is contained in:
Victor Hsieh 2022-10-05 17:15:54 -07:00
parent 2377248cd6
commit 1b8ac1a879

View file

@ -48,12 +48,6 @@ int main(int argc, const char** argv) {
return -1;
}
} else if (command == "--lock") {
// Requires files backed by fs-verity to be verified with a key in .fs-verity
// keyring.
if (!android::base::WriteStringToFile("1", "/proc/sys/fs/verity/require_signatures")) {
PLOG(ERROR) << "Failed to enforce fs-verity signature";
}
if (!android::base::GetBoolProperty("ro.debuggable", false)) {
if (keyctl_restrict_keyring(keyring_id, nullptr, nullptr) < 0) {
PLOG(ERROR) << "Cannot restrict .fs-verity keyring";