android_kernel_oneplus_msm8998/security/integrity/ima
Mimi Zohar 851ae480e6 Revert "ima: limit file hash setting by user to fix and log modes"
commit f5acb3dcba1ffb7f0b8cbb9dba61500eea5d610b upstream.

Userspace applications have been modified to write security xattrs,
but they are not context aware.  In the case of security.ima, the
security xattr can be either a file hash or a file signature.
Permitting writing one, but not the other requires the application to
be context aware.

In addition, userspace applications might write files to a staging
area, which might not be in policy, and then change some file metadata
(eg. owner) making it in policy.  As a result, these files are not
labeled properly.

This reverts commit c68ed80c97, which
prevents writing file hashes as security.ima xattrs.

Requested-by: Patrick Ohly <patrick.ohly@intel.com>
Cc: Dmitry Kasatkin <dmitry.kasatkin@gmail.com>
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Cc: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-06 16:46:20 +02:00
..
ima.h ima: fix ima_show_template_data_ascii() 2015-06-16 08:18:21 -04:00
ima_api.c ima: use file_dentry() 2016-10-16 17:36:15 +02:00
ima_appraise.c Revert "ima: limit file hash setting by user to fix and log modes" 2018-06-06 16:46:20 +02:00
ima_crypto.c ima: Fallback to the builtin hash algorithm 2018-05-30 07:49:10 +02:00
ima_fs.c ima: fix ima_show_template_data_ascii() 2015-06-16 08:18:21 -04:00
ima_init.c ima: pass iint to ima_add_violation() 2015-05-21 13:59:29 -04:00
ima_main.c ima: Fallback to the builtin hash algorithm 2018-05-30 07:49:10 +02:00
ima_policy.c ima: update builtin policies 2015-06-16 08:18:45 -04:00
ima_queue.c integrity: fix checkpatch errors 2014-03-07 12:15:45 -05:00
ima_template.c ima: added support for new kernel cmdline parameter ima_template_fmt 2014-10-13 08:39:02 -04:00
ima_template_lib.c ima: fix ima_show_template_data_ascii() 2015-06-16 08:18:21 -04:00
ima_template_lib.h ima: wrap event related data to the new ima_event_data structure 2015-05-21 13:59:28 -04:00
Kconfig ima: Fix Kconfig to select TPM 2.0 CRB interface 2018-05-30 07:49:10 +02:00
Makefile ima: define template fields library and new helpers 2013-10-25 17:17:05 -04:00