- 18 7月, 2018 7 次提交
-
-
由 Matthew Garrett 提交于
SHA1 is reasonable in HMAC constructs, but it's desirable to be able to use stronger hashes in digital signatures. Modify the EVM crypto code so the hash type is imported from the digital signature and passed down to the hash calculation code, and return the digest size to higher layers for validation. Signed-off-by: NMatthew Garrett <mjg59@google.com> Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
-
由 Matthew Garrett 提交于
When EVM attempts to appraise a file signed with a crypto algorithm the kernel doesn't have support for, it will cause the kernel to trigger a module load. If the EVM policy includes appraisal of kernel modules this will in turn call back into EVM - since EVM is holding a lock until the crypto initialisation is complete, this triggers a deadlock. Add a CRYPTO_NOLOAD flag and skip module loading if it's set, and add that flag in the EVM case in order to fail gracefully with an error message instead of deadlocking. Signed-off-by: NMatthew Garrett <mjg59@google.com> Acked-by: NHerbert Xu <herbert@gondor.apana.org.au> Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
-
由 Sudeep Holla 提交于
When CONFIG_SECURITYFS is not enabled, securityfs_create_dir returns -ENODEV which throws the following error: "Unable to create integrity sysfs dir: -19" However, if the feature is disabled, it can't be warning and hence we need to silence the error. This patch checks for the error -ENODEV which is returned when CONFIG_SECURITYFS is disabled to stop the error being thrown. Signed-off-by: NSudeep Holla <sudeep.holla@arm.com> Acked-by: NMatthew Garrett <mjg59@google.com> Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
-
由 Stefan Berger 提交于
The AUDIT_INTEGRITY_RULE is used for auditing IMA policy rules and the IMA "audit" policy action. This patch defines AUDIT_INTEGRITY_POLICY_RULE to reflect the IMA policy rules. Since we defined a new message type we can now also pass the audit_context and get an associated SYSCALL record. This now produces the following records when parsing IMA policy's rules: type=UNKNOWN[1807] msg=audit(1527888965.738:320): action=audit \ func=MMAP_CHECK mask=MAY_EXEC res=1 type=UNKNOWN[1807] msg=audit(1527888965.738:320): action=audit \ func=FILE_CHECK mask=MAY_READ res=1 type=SYSCALL msg=audit(1527888965.738:320): arch=c000003e syscall=1 \ success=yes exit=17 a0=1 a1=55bcfcca9030 a2=11 a3=7fcc1b55fb38 \ items=0 ppid=1567 pid=1601 auid=0 uid=0 gid=0 euid=0 suid=0 \ fsuid=0 egid=0 sgid=0 fsgid=0 tty=tty2 ses=2 comm="echo" \ exe="/usr/bin/echo" \ subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null) Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Acked-by: NPaul Moore <paul@paul-moore.com> Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
-
由 Stefan Berger 提交于
If Integrity is not auditing, IMA shouldn't audit, either. Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Acked-by: NPaul Moore <paul@paul-moore.com> Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
-
由 Stefan Berger 提交于
Remove the usage of audit_log_string() and replace it with audit_log_format(). Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Suggested-by: NSteve Grubb <sgrubb@redhat.com> Acked-by: NPaul Moore <paul@paul-moore.com> Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
-
由 Stefan Berger 提交于
The parameters passed to this logging function are all provided by a privileged user and therefore we can call audit_log_string() rather than audit_log_untrustedstring(). Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Suggested-by: NSteve Grubb <sgrubb@redhat.com> Acked-by: NPaul Moore <paul@paul-moore.com> Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
-
- 17 7月, 2018 5 次提交
-
-
由 Mimi Zohar 提交于
Some systems are memory constrained but they need to load very large firmwares. The firmware subsystem allows drivers to request this firmware be loaded from the filesystem, but this requires that the entire firmware be loaded into kernel memory first before it's provided to the driver. This can lead to a situation where we map the firmware twice, once to load the firmware into kernel memory and once to copy the firmware into the final resting place. To resolve this problem, commit a098ecd2 ("firmware: support loading into a pre-allocated buffer") introduced request_firmware_into_buf() API that allows drivers to request firmware be loaded directly into a pre-allocated buffer. Do devices using pre-allocated memory run the risk of the firmware being accessible to the device prior to the completion of IMA's signature verification any more than when using two buffers? (Refer to mailing list discussion[1]). Only on systems with an IOMMU can the access be prevented. As long as the signature verification completes prior to the DMA map is performed, the device can not access the buffer. This implies that the same buffer can not be re-used. Can we ensure the buffer has not been DMA mapped before using the pre-allocated buffer? [1] https://lkml.org/lkml/2018/7/10/56Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com> Cc: Luis R. Rodriguez <mcgrof@suse.com> Cc: Stephen Boyd <sboyd@kernel.org> Cc: Bjorn Andersson <bjorn.andersson@linaro.org> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: NKees Cook <keescook@chromium.org> Signed-off-by: NJames Morris <james.morris@microsoft.com>
-
由 Mimi Zohar 提交于
Both the init_module and finit_module syscalls call either directly or indirectly the security_kernel_read_file LSM hook. This patch replaces the direct call in init_module with a call to the new security_kernel_load_data hook and makes the corresponding changes in SELinux, LoadPin, and IMA. Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com> Cc: Jeff Vander Stoep <jeffv@google.com> Cc: Casey Schaufler <casey@schaufler-ca.com> Cc: Kees Cook <keescook@chromium.org> Acked-by: NJessica Yu <jeyu@kernel.org> Acked-by: NPaul Moore <paul@paul-moore.com> Acked-by: NKees Cook <keescook@chromium.org> Signed-off-by: NJames Morris <james.morris@microsoft.com>
-
由 Mimi Zohar 提交于
IMA by default does not measure, appraise or audit files, but can be enabled at runtime by specifying a builtin policy on the boot command line or by loading a custom policy. This patch defines a build time policy, which verifies kernel modules, firmware, kexec image, and/or the IMA policy signatures. This build time policy is automatically enabled at runtime and persists after loading a custom policy. Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com> Reviewed-by: NKees Cook <keescook@chromium.org> Signed-off-by: NJames Morris <james.morris@microsoft.com>
-
由 Mimi Zohar 提交于
With an IMA policy requiring signed firmware, this patch prevents the sysfs fallback method of loading firmware. Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com> Reviewed-by: NKees Cook <keescook@chromium.org> Cc: Luis R. Rodriguez <mcgrof@suse.com> Cc: Matthew Garrett <mjg59@google.com> Signed-off-by: NJames Morris <james.morris@microsoft.com>
-
由 Mimi Zohar 提交于
The original kexec_load syscall can not verify file signatures, nor can the kexec image be measured. Based on policy, deny the kexec_load syscall. Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com> Cc: Eric Biederman <ebiederm@xmission.com> Cc: Kees Cook <keescook@chromium.org> Reviewed-by: NKees Cook <keescook@chromium.org> Signed-off-by: NJames Morris <james.morris@microsoft.com>
-
- 01 6月, 2018 1 次提交
-
-
由 Dan Carpenter 提交于
We need to unlock before returning on this error path. Fixes: fa516b66 ("EVM: Allow runtime modification of the set of verified xattrs") Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
-
- 31 5月, 2018 5 次提交
-
-
由 Dan Carpenter 提交于
If the user sets xattr->name[0] to NUL then we would read one character before the start of the array. This bug seems harmless as far as I can see but perhaps it would trigger a warning in KASAN. Fixes: fa516b66 ("EVM: Allow runtime modification of the set of verified xattrs") Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
-
由 Colin Ian King 提交于
In the case where the allocation of xattr fails and xattr is NULL, the error exit return path via label 'out' will dereference xattr when kfree'ing xattr-name. Fix this by only kfree'ing xattr->name and xattr when xattr is non-null. Detected by CoverityScan, CID#1469366 ("Dereference after null check") Fixes: fa516b66 ("EVM: Allow runtime modification of the set of verified xattrs") Signed-off-by: NColin Ian King <colin.king@canonical.com> Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
-
由 Colin Ian King 提交于
The allocation of 'temp' is not kfree'd and hence there is a memory leak on each call of evm_read_xattrs. Fix this by kfree'ing it after copying data from it back to the user space buffer 'buf'. Detected by CoverityScan, CID#1469386 ("Resource Leak") Fixes: fa516b66 ("EVM: Allow runtime modification of the set of verified xattrs") Signed-off-by: NColin Ian King <colin.king@canonical.com> Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
-
由 Petko Manolov 提交于
Use list_splice_tail_init_rcu() to extend the existing custom IMA policy with additional IMA policy rules. Signed-off-by: NPetko Manolov <petko.manolov@konsulko.com> Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
-
由 Yisheng Xie 提交于
match_string() returns the index of an array for a matching string, which can be used intead of open coded variant. Signed-off-by: NYisheng Xie <xieyisheng1@huawei.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
-
- 23 5月, 2018 1 次提交
-
-
由 Mimi Zohar 提交于
As IMA policy rules are added, a mask of the type of rule (eg. kernel modules, firmware, IMA policy) is updated. Unlike custom IMA policy rules, which replace the original builtin policy rules and update the mask, the builtin "secure_boot" policy rules were loaded, but did not update the mask. This patch refactors the code to load custom policies, defining a new function named ima_appraise_flag(). The new function is called either when loading the builtin "secure_boot" or custom policies. Fixes: 503ceaef ("ima: define a set of appraisal rules requiring file signatures") Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
-
- 22 5月, 2018 2 次提交
-
-
由 Mimi Zohar 提交于
Don't differentiate, for now, between kernel_read_file_id READING_FIRMWARE and READING_FIRMWARE_PREALLOC_BUFFER enumerations. Fixes: a098ecd2 firmware: support loading into a pre-allocated buffer (since 4.8) Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com> Cc: Luis R. Rodriguez <mcgrof@suse.com> Cc: David Howells <dhowells@redhat.com> Cc: Kees Cook <keescook@chromium.org> Cc: Serge E. Hallyn <serge@hallyn.com> Cc: Stephen Boyd <stephen.boyd@linaro.org>
-
由 Mimi Zohar 提交于
If/when file data signatures are distributed with the file data, this patch will not be needed. In the current environment where only some files are signed, the ability to differentiate between file systems is needed. Some file systems consider the file system magic number internal to the file system. This patch defines a new IMA policy condition named "fsname", based on the superblock's file_system_type (sb->s_type) name. This allows policy rules to be expressed in terms of the filesystem name. The following sample rules require file signatures on rootfs files executed or mmap'ed. appraise func=BPRM_CHECK fsname=rootfs appraise_type=imasig appraise func=FILE_MMAP fsname=rootfs appraise_type=imasig Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com> Cc: Dave Chinner <david@fromorbit.com> Cc: Theodore Ts'o <tytso@mit.edu>
-
- 19 5月, 2018 2 次提交
-
-
由 Matthew Garrett 提交于
Sites may wish to provide additional metadata alongside files in order to make more fine-grained security decisions[1]. The security of this is enhanced if this metadata is protected, something that EVM makes possible. However, the kernel cannot know about the set of extended attributes that local admins may wish to protect, and hardcoding this policy in the kernel makes it difficult to change over time and less convenient for distributions to enable. This patch adds a new /sys/kernel/security/integrity/evm/evm_xattrs node, which can be read to obtain the current set of EVM-protected extended attributes or written to in order to add new entries. Extending this list will not change the validity of any existing signatures provided that the file in question does not have any of the additional extended attributes - missing xattrs are skipped when calculating the EVM hash. [1] For instance, a package manager could install information about the package uploader in an additional extended attribute. Local LSM policy could then be associated with that extended attribute in order to restrict the privileges available to packages from less trusted uploaders. Signed-off-by: NMatthew Garrett <mjg59@google.com> Reviewed-by: NJames Morris <james.morris@microsoft.com> Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
-
由 Matthew Garrett 提交于
Use a list of xattrs rather than an array - this makes it easier to extend the list at runtime. Signed-off-by: NMatthew Garrett <mjg59@google.com> Reviewed-by: NJames Morris <james.morris@microsoft.com> Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
-
- 17 5月, 2018 4 次提交
-
-
由 Matthew Garrett 提交于
We want to add additional evm control nodes, and it'd be preferable not to clutter up the securityfs root directory any further. Create a new integrity directory, move the ima directory into it, create an evm directory for the evm attribute and add compatibility symlinks. Signed-off-by: NMatthew Garrett <mjg59@google.com> Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
-
由 Petr Vorel 提交于
Commit a756024e ("ima: added ima_policy_flag variable") replaced ima_initialized with ima_policy_flag, but didn't remove ima_initialized. This patch removes it. Signed-off-by: NPetr Vorel <pvorel@suse.cz> Reviewed-by: NJames Morris <james.morris@microsoft.com> Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
-
由 Petr Vorel 提交于
Define pr_fmt everywhere. Signed-off-by: NPetr Vorel <pvorel@suse.cz> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> (powerpc build error) Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com> Changelog: Previous pr_fmt definition was too late and caused problems in powerpc allyesconfg build.
-
由 Petr Vorel 提交于
Kernel configured as CONFIG_IMA_READ_POLICY=y && CONFIG_IMA_WRITE_POLICY=n keeps 0600 mode after loading policy. Remove write permission to state that policy file no longer be written. Signed-off-by: NPetr Vorel <pvorel@suse.cz> Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
-
- 15 5月, 2018 1 次提交
-
-
由 Richard Guy Briggs 提交于
Recognizing that the audit context is an internal audit value, use an access function to retrieve the audit context pointer for the task rather than reaching directly into the task struct to get it. Signed-off-by: NRichard Guy Briggs <rgb@redhat.com> [PM: merge fuzz in auditsc.c and selinuxfs.c, checkpatch.pl fixes] Signed-off-by: NPaul Moore <paul@paul-moore.com>
-
- 04 5月, 2018 1 次提交
-
-
由 Seth Forshee 提交于
The kernel should not calculate new hmacs for mounts done by non-root users. Update evm_calc_hmac_or_hash() to refuse to calculate new hmacs for mounts for non-init user namespaces. Cc: linux-integrity@vger.kernel.org Cc: linux-security-module@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: James Morris <james.l.morris@oracle.com> Cc: Mimi Zohar <zohar@linux.vnet.ibm.com> Cc: "Serge E. Hallyn" <serge@hallyn.com> Signed-off-by: NSeth Forshee <seth.forshee@canonical.com> Signed-off-by: NDongsu Park <dongsu@kinvolk.io> Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
-
- 25 3月, 2018 8 次提交
-
-
由 Petr Vorel 提交于
IMA requires having it's hash algorithm be compiled-in due to it's early use. The default IMA algorithm is protected by Kconfig to be compiled-in. The ima_hash kernel parameter allows to choose the hash algorithm. When the specified algorithm is not available or available as a module, IMA initialization fails, which leads to a kernel panic (mknodat syscall calls ima_post_path_mknod()). Therefore as fallback we force IMA to use the default builtin Kconfig hash algorithm. Fixed crash: $ grep CONFIG_CRYPTO_MD4 .config CONFIG_CRYPTO_MD4=m [ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.12.14-2.3-default root=UUID=74ae8202-9ca7-4e39-813b-22287ec52f7a video=1024x768-16 plymouth.ignore-serial-consoles console=ttyS0 console=tty resume=/dev/disk/by-path/pci-0000:00:07.0-part3 splash=silent showopts ima_hash=md4 ... [ 1.545190] ima: Can not allocate md4 (reason: -2) ... [ 2.610120] BUG: unable to handle kernel NULL pointer dereference at (null) [ 2.611903] IP: ima_match_policy+0x23/0x390 [ 2.612967] PGD 0 P4D 0 [ 2.613080] Oops: 0000 [#1] SMP [ 2.613080] Modules linked in: autofs4 [ 2.613080] Supported: Yes [ 2.613080] CPU: 0 PID: 1 Comm: systemd Not tainted 4.12.14-2.3-default #1 [ 2.613080] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.0.0-prebuilt.qemu-project.org 04/01/2014 [ 2.613080] task: ffff88003e2d0040 task.stack: ffffc90000190000 [ 2.613080] RIP: 0010:ima_match_policy+0x23/0x390 [ 2.613080] RSP: 0018:ffffc90000193e88 EFLAGS: 00010296 [ 2.613080] RAX: 0000000000000000 RBX: 000000000000000c RCX: 0000000000000004 [ 2.613080] RDX: 0000000000000010 RSI: 0000000000000001 RDI: ffff880037071728 [ 2.613080] RBP: 0000000000008000 R08: 0000000000000000 R09: 0000000000000000 [ 2.613080] R10: 0000000000000008 R11: 61c8864680b583eb R12: 00005580ff10086f [ 2.613080] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000008000 [ 2.613080] FS: 00007f5c1da08940(0000) GS:ffff88003fc00000(0000) knlGS:0000000000000000 [ 2.613080] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 2.613080] CR2: 0000000000000000 CR3: 0000000037002000 CR4: 00000000003406f0 [ 2.613080] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 2.613080] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 2.613080] Call Trace: [ 2.613080] ? shmem_mknod+0xbf/0xd0 [ 2.613080] ima_post_path_mknod+0x1c/0x40 [ 2.613080] SyS_mknod+0x210/0x220 [ 2.613080] entry_SYSCALL_64_fastpath+0x1a/0xa5 [ 2.613080] RIP: 0033:0x7f5c1bfde570 [ 2.613080] RSP: 002b:00007ffde1c90dc8 EFLAGS: 00000246 ORIG_RAX: 0000000000000085 [ 2.613080] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f5c1bfde570 [ 2.613080] RDX: 0000000000000000 RSI: 0000000000008000 RDI: 00005580ff10086f [ 2.613080] RBP: 00007ffde1c91040 R08: 00005580ff10086f R09: 0000000000000000 [ 2.613080] R10: 0000000000104000 R11: 0000000000000246 R12: 00005580ffb99660 [ 2.613080] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000002 [ 2.613080] Code: 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 41 57 41 56 44 8d 14 09 41 55 41 54 55 53 44 89 d3 09 cb 48 83 ec 38 48 8b 05 c5 03 29 01 <4c> 8b 20 4c 39 e0 0f 84 d7 01 00 00 4c 89 44 24 08 89 54 24 20 [ 2.613080] RIP: ima_match_policy+0x23/0x390 RSP: ffffc90000193e88 [ 2.613080] CR2: 0000000000000000 [ 2.613080] ---[ end trace 9a9f0a8a73079f6a ]--- [ 2.673052] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000009 [ 2.673052] [ 2.675337] Kernel Offset: disabled [ 2.676405] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000009 Signed-off-by: NPetr Vorel <pvorel@suse.cz> Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
-
由 Martin Townsend 提交于
This is required to use SMACK and IMA/EVM together. Add it to the default nomeasure/noappraise list like other pseudo filesystems. Signed-off-by: NMartin Townsend <mtownsend1973@gmail.com> Acked-by: NCasey Schaufler <casey@schaufler-ca.com> Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
-
由 Sascha Hauer 提交于
EVM might update the evm xattr while the VFS performs a remount to readonly mode. This is not properly checked for, additionally check the s_readonly_remount superblock flag before writing. The bug can for example be observed with UBIFS. UBIFS checks the free space on the device before and after a remount. With EVM enabled the free space sometimes differs between both checks. Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
-
由 Thiago Jung Bauermann 提交于
Replace nested ifs in the EVM xattr verification logic with a switch statement, making the code easier to understand. Also, add comments to the if statements in the out section and constify the cause variable. Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com> Signed-off-by: NThiago Jung Bauermann <bauerman@linux.vnet.ibm.com> Acked-by: NSerge Hallyn <serge@hallyn.com>
-
由 Thiago Jung Bauermann 提交于
The "goto out" statement doesn't have any purpose since there's no cleanup to be done when returning early, so remove it. This also makes the rc variable unnecessary so remove it as well. Also, the xattr_len and fmt variables are redundant so remove them as well. Signed-off-by: NThiago Jung Bauermann <bauerman@linux.vnet.ibm.com> Acked-by: NSerge Hallyn <serge@hallyn.com> Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
-
由 Thiago Jung Bauermann 提交于
This macro isn't used anymore since commit 0d73a552 ("ima: re-introduce own integrity cache lock"), so remove it. Signed-off-by: NThiago Jung Bauermann <bauerman@linux.vnet.ibm.com> Acked-by: NSerge Hallyn <serge@hallyn.com> Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
-
由 Tycho Andersen 提交于
In keeping with the directive to get rid of VLAs [1], let's drop the VLA from ima_audit_measurement(). We need to adjust the return type of ima_audit_measurement, because now this function can fail if an allocation fails. [1]: https://lkml.org/lkml/2018/3/7/621 v2: just use audit_log_format instead of doing a second allocation v3: ignore failures in ima_audit_measurement() Signed-off-by: NTycho Andersen <tycho@tycho.ws> Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
-
由 Jiandi An 提交于
TPM_CRB driver provides TPM CRB 2.0 support. If it is built as a module, the TPM chip is registered after IMA init. tpm_pcr_read() in IMA fails and displays the following message even though eventually there is a TPM chip on the system. ima: No TPM chip found, activating TPM-bypass! (rc=-19) Fix IMA Kconfig to select TPM_CRB so TPM_CRB driver is built in the kernel and initializes before IMA. Signed-off-by: NJiandi An <anjiandi@codeaurora.org> Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
-
- 23 3月, 2018 3 次提交
-
-
由 Hernán Gonzalez 提交于
There is no gain from doing this except for some self-documenting. Signed-off-by: NHernán Gonzalez <hernan@vanguardiasur.com.ar> Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
-
由 Hernán Gonzalez 提交于
These variables are not used where they are was defined. There is no point in declaring them there as extern. Move and constify them, saving 2 bytes. Function old new delta init_desc 273 271 -2 Total: Before=2112094, After=2112092, chg -0.00% Signed-off-by: NHernán Gonzalez <hernan@vanguardiasur.com.ar> Tested-by: NFengguang Wu <fengguang.wu@intel.com> Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
-
由 Mimi Zohar 提交于
This patch addresses the fuse privileged mounted filesystems in environments which are unwilling to accept the risk of trusting the signature verification and want to always fail safe, but are for example using a pre-built kernel. This patch defines a new builtin policy named "fail_securely", which can be specified on the boot command line as an argument to "ima_policy=". Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com> Cc: Miklos Szeredi <miklos@szeredi.hu> Cc: Seth Forshee <seth.forshee@canonical.com> Cc: Dongsu Park <dongsu@kinvolk.io> Cc: Alban Crequy <alban@kinvolk.io> Acked-by: NSerge Hallyn <serge@hallyn.com> Acked-by: N"Eric W. Biederman" <ebiederm@xmission.com>
-