1. 08 Nov, 2017 10 commits
    • Bruno E. O. Meneguele's avatar
      module: export module signature enforcement status · fda784e5
      Bruno E. O. Meneguele authored
      A static variable sig_enforce is used as status var to indicate the real
      value of CONFIG_MODULE_SIG_FORCE, once this one is set the var will hold
      true, but if the CONFIG is not set the status var will hold whatever
      value is present in the module.sig_enforce kernel cmdline param: true
      when =1 and false when =0 or not present.
      
      Considering this cmdline param take place over the CONFIG value when
      it's not set, other places in the kernel could misbehave since they
      would have only the CONFIG_MODULE_SIG_FORCE value to rely on. Exporting
      this status var allows the kernel to rely in the effective value of
      module signature enforcement, being it from CONFIG value or cmdline
      param.
      Signed-off-by: default avatarBruno E. O. Meneguele <brdeoliv@redhat.com>
      Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
      fda784e5
    • Boshi Wang's avatar
      ima: fix hash algorithm initialization · ebe7c0a7
      Boshi Wang authored
      The hash_setup function always sets the hash_setup_done flag, even
      when the hash algorithm is invalid.  This prevents the default hash
      algorithm defined as CONFIG_IMA_DEFAULT_HASH from being used.
      
      This patch sets hash_setup_done flag only for valid hash algorithms.
      
      Fixes: e7a2ad7e "ima: enable support for larger default filedata hash
      	algorithms"
      Signed-off-by: default avatarBoshi Wang <wangboshi@huawei.com>
      Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
      ebe7c0a7
    • Matthew Garrett's avatar
      EVM: Only complain about a missing HMAC key once · 0485d066
      Matthew Garrett authored
      A system can validate EVM digital signatures without requiring an HMAC
      key, but every EVM validation will generate a kernel error. Change this
      so we only generate an error once.
      Signed-off-by: default avatarMatthew Garrett <mjg59@google.com>
      Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
      0485d066
    • Matthew Garrett's avatar
      EVM: Allow userspace to signal an RSA key has been loaded · f00d7975
      Matthew Garrett authored
      EVM will only perform validation once a key has been loaded. This key
      may either be a symmetric trusted key (for HMAC validation and creation)
      or the public half of an asymmetric key (for digital signature
      validation). The /sys/kernel/security/evm interface allows userland to
      signal that a symmetric key has been loaded, but does not allow userland
      to signal that an asymmetric public key has been loaded.
      
      This patch extends the interface to permit userspace to pass a bitmask
      of loaded key types. It also allows userspace to block loading of a
      symmetric key in order to avoid a compromised system from being able to
      load an additional key type later.
      Signed-off-by: default avatarMatthew Garrett <mjg59@google.com>
      Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
      f00d7975
    • Matthew Garrett's avatar
      EVM: Include security.apparmor in EVM measurements · 096b8546
      Matthew Garrett authored
      Apparmor will be gaining support for security.apparmor labels, and it
      would be helpful to include these in EVM validation now so appropriate
      signatures can be generated even before full support is merged.
      Signed-off-by: default avatarMatthew Garrett <mjg59@google.com>
      Acked-by: default avatarJohn Johansen <John.johansen@canonical.com>
      Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
      096b8546
    • Mimi Zohar's avatar
      ima: call ima_file_free() prior to calling fasync · bb02b186
      Mimi Zohar authored
      The file hash is calculated and written out as an xattr after
      calling fasync().  In order for the file data and metadata to be
      written out to disk at the same time, this patch calculates the
      file hash and stores it as an xattr before calling fasync.
      Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
      bb02b186
    • Christoph Hellwig's avatar
      integrity: use kernel_read_file_from_path() to read x509 certs · a7d3d039
      Christoph Hellwig authored
      The CONFIG_IMA_LOAD_X509 and CONFIG_EVM_LOAD_X509 options permit
      loading x509 signed certificates onto the trusted keyrings without
      verifying the x509 certificate file's signature.
      
      This patch replaces the call to the integrity_read_file() specific
      function with the common kernel_read_file_from_path() function.
      To avoid verifying the file signature, this patch defines
      READING_X509_CERTFICATE.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
      a7d3d039
    • Mimi Zohar's avatar
      ima: always measure and audit files in policy · f3cc6b25
      Mimi Zohar authored
      All files matching a "measure" rule must be included in the IMA
      measurement list, even when the file hash cannot be calculated.
      Similarly, all files matching an "audit" rule must be audited, even when
      the file hash can not be calculated.
      
      The file data hash field contained in the IMA measurement list template
      data will contain 0's instead of the actual file hash digest.
      
      Note:
      In general, adding, deleting or in anyway changing which files are
      included in the IMA measurement list is not a good idea, as it might
      result in not being able to unseal trusted keys sealed to a specific
      TPM PCR value.  This patch not only adds file measurements that were
      not previously measured, but specifies that the file hash value for
      these files will be 0's.
      
      As the IMA measurement list ordering is not consistent from one boot
      to the next, it is unlikely that anyone is sealing keys based on the
      IMA measurement list.  Remote attestation servers should be able to
      process these new measurement records, but might complain about
      these unknown records.
      Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
      Reviewed-by: default avatarDmitry Kasatkin <dmitry.kasatkin@huawei.com>
      f3cc6b25
    • Mimi Zohar's avatar
      ima: don't remove the securityfs policy file · 2068626d
      Mimi Zohar authored
      The securityfs policy file is removed unless additional rules can be
      appended to the IMA policy (CONFIG_IMA_WRITE_POLICY), regardless as
      to whether the policy is configured so that it can be displayed.
      
      This patch changes this behavior, removing the securityfs policy file,
      only if CONFIG_IMA_READ_POLICY is also not enabled.
      Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
      2068626d
    • Mimi Zohar's avatar
      vfs: fix mounting a filesystem with i_version · 46cdc6d5
      Mimi Zohar authored
      The mount i_version flag is not enabled in the new sb_flags.  This patch
      adds the missing SB_I_VERSION flag.
      
      Fixes: e462ec50 "VFS: Differentiate mount flags (MS_*) from internal
             superblock flags"
      Cc: David Howells <dhowells@redhat.com>
      Cc: Al Viro <viro@ZenIV.linux.org.uk>
      Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
      46cdc6d5
  2. 05 Nov, 2017 1 commit
  3. 02 Nov, 2017 1 commit
  4. 27 Oct, 2017 1 commit
  5. 21 Oct, 2017 1 commit
  6. 20 Oct, 2017 10 commits
  7. 18 Oct, 2017 13 commits
  8. 12 Oct, 2017 1 commit
  9. 25 Sep, 2017 1 commit
  10. 24 Sep, 2017 1 commit