Kconfig 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. #
  3. config INTEGRITY
  4. bool "Integrity subsystem"
  5. depends on SECURITY
  6. default y
  7. help
  8. This option enables the integrity subsystem, which is comprised
  9. of a number of different components including the Integrity
  10. Measurement Architecture (IMA), Extended Verification Module
  11. (EVM), IMA-appraisal extension, digital signature verification
  12. extension and audit measurement log support.
  13. Each of these components can be enabled/disabled separately.
  14. Refer to the individual components for additional details.
  15. if INTEGRITY
  16. config INTEGRITY_SIGNATURE
  17. bool "Digital signature verification using multiple keyrings"
  18. default n
  19. select KEYS
  20. select SIGNATURE
  21. help
  22. This option enables digital signature verification support
  23. using multiple keyrings. It defines separate keyrings for each
  24. of the different use cases - evm, ima, and modules.
  25. Different keyrings improves search performance, but also allow
  26. to "lock" certain keyring to prevent adding new keys.
  27. This is useful for evm and module keyrings, when keys are
  28. usually only added from initramfs.
  29. config INTEGRITY_ASYMMETRIC_KEYS
  30. bool "Enable asymmetric keys support"
  31. depends on INTEGRITY_SIGNATURE
  32. default n
  33. select ASYMMETRIC_KEY_TYPE
  34. select ASYMMETRIC_PUBLIC_KEY_SUBTYPE
  35. select CRYPTO_RSA
  36. select X509_CERTIFICATE_PARSER
  37. help
  38. This option enables digital signature verification using
  39. asymmetric keys.
  40. config INTEGRITY_TRUSTED_KEYRING
  41. bool "Require all keys on the integrity keyrings be signed"
  42. depends on SYSTEM_TRUSTED_KEYRING
  43. depends on INTEGRITY_ASYMMETRIC_KEYS
  44. default y
  45. help
  46. This option requires that all keys added to the .ima and
  47. .evm keyrings be signed by a key on the system trusted
  48. keyring.
  49. config INTEGRITY_PLATFORM_KEYRING
  50. bool "Provide keyring for platform/firmware trusted keys"
  51. depends on INTEGRITY_ASYMMETRIC_KEYS
  52. depends on SYSTEM_BLACKLIST_KEYRING
  53. help
  54. Provide a separate, distinct keyring for platform trusted keys, which
  55. the kernel automatically populates during initialization from values
  56. provided by the platform for verifying the kexec'ed kerned image
  57. and, possibly, the initramfs signature.
  58. config INTEGRITY_MACHINE_KEYRING
  59. bool "Provide a keyring to which Machine Owner Keys may be added"
  60. depends on SECONDARY_TRUSTED_KEYRING
  61. depends on INTEGRITY_ASYMMETRIC_KEYS
  62. depends on SYSTEM_BLACKLIST_KEYRING
  63. depends on LOAD_UEFI_KEYS || LOAD_PPC_KEYS
  64. help
  65. If set, provide a keyring to which Machine Owner Keys (MOK) may
  66. be added. This keyring shall contain just MOK keys. Unlike keys
  67. in the platform keyring, keys contained in the .machine keyring will
  68. be trusted within the kernel.
  69. config INTEGRITY_CA_MACHINE_KEYRING
  70. bool "Enforce Machine Keyring CA Restrictions"
  71. depends on INTEGRITY_MACHINE_KEYRING
  72. default n
  73. help
  74. The .machine keyring can be configured to enforce CA restriction
  75. on any key added to it. By default no restrictions are in place
  76. and all Machine Owner Keys (MOK) are added to the machine keyring.
  77. If enabled only CA keys are added to the machine keyring, all
  78. other MOK keys load into the platform keyring.
  79. config INTEGRITY_CA_MACHINE_KEYRING_MAX
  80. bool "Only CA keys without DigitialSignature usage set"
  81. depends on INTEGRITY_CA_MACHINE_KEYRING
  82. default n
  83. help
  84. When selected, only load CA keys are loaded into the machine
  85. keyring that contain the CA bit set along with the keyCertSign
  86. Usage field. Keys containing the digitialSignature Usage field
  87. will not be loaded. The remaining MOK keys are loaded into the
  88. .platform keyring.
  89. config LOAD_UEFI_KEYS
  90. depends on INTEGRITY_PLATFORM_KEYRING
  91. depends on EFI
  92. def_bool y
  93. config LOAD_IPL_KEYS
  94. depends on INTEGRITY_PLATFORM_KEYRING
  95. depends on S390
  96. def_bool y
  97. config LOAD_PPC_KEYS
  98. bool "Enable loading of platform and blacklisted keys for POWER"
  99. depends on INTEGRITY_PLATFORM_KEYRING
  100. depends on PPC_SECURE_BOOT
  101. default y
  102. help
  103. Enable loading of keys to the .platform keyring and blacklisted
  104. hashes to the .blacklist keyring for powerpc based platforms.
  105. config INTEGRITY_AUDIT
  106. bool "Enables integrity auditing support "
  107. depends on AUDIT
  108. default y
  109. help
  110. In addition to enabling integrity auditing support, this
  111. option adds a kernel parameter 'integrity_audit', which
  112. controls the level of integrity auditing messages.
  113. 0 - basic integrity auditing messages (default)
  114. 1 - additional integrity auditing messages
  115. Additional informational integrity auditing messages would
  116. be enabled by specifying 'integrity_audit=1' on the kernel
  117. command line.
  118. source "security/integrity/ima/Kconfig"
  119. source "security/integrity/evm/Kconfig"
  120. endif # if INTEGRITY