diff options
author | Tushar Sugandhi <tusharsu@linux.microsoft.com> | 2021-07-12 17:48:58 -0700 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2021-08-10 13:32:40 -0400 |
commit | 91ccbbac1747eea155632a1c6bb100052309b215 (patch) | |
tree | eb0fd0c79d6e90100da2c75fc86699e45f1e6c70 /security | |
parent | e3a35d03407cb3ef9488835aa861e07b45638d0b (diff) | |
download | linux-91ccbbac1747eea155632a1c6bb100052309b215.tar.gz linux-91ccbbac1747eea155632a1c6bb100052309b215.tar.bz2 linux-91ccbbac1747eea155632a1c6bb100052309b215.zip |
dm ima: measure data on table load
DM configures a block device with various target specific attributes
passed to it as a table. DM loads the table, and calls each target’s
respective constructors with the attributes as input parameters.
Some of these attributes are critical to ensure the device meets
certain security bar. Thus, IMA should measure these attributes, to
ensure they are not tampered with, during the lifetime of the device.
So that the external services can have high confidence in the
configuration of the block-devices on a given system.
Some devices may have large tables. And a given device may change its
state (table-load, suspend, resume, rename, remove, table-clear etc.)
many times. Measuring these attributes each time when the device
changes its state will significantly increase the size of the IMA logs.
Further, once configured, these attributes are not expected to change
unless a new table is loaded, or a device is removed and recreated.
Therefore the clear-text of the attributes should only be measured
during table load, and the hash of the active/inactive table should be
measured for the remaining device state changes.
Export IMA function ima_measure_critical_data() to allow measurement
of DM device parameters, as well as target specific attributes, during
table load. Compute the hash of the inactive table and store it for
measurements during future state change. If a load is called multiple
times, update the inactive table hash with the hash of the latest
populated table. So that the correct inactive table hash is measured
when the device transitions to different states like resume, remove,
rename, etc.
Signed-off-by: Tushar Sugandhi <tusharsu@linux.microsoft.com>
Signed-off-by: Colin Ian King <colin.king@canonical.com> # leak fix
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'security')
-rw-r--r-- | security/integrity/ima/ima_main.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c index 287b90509006..673833f94069 100644 --- a/security/integrity/ima/ima_main.c +++ b/security/integrity/ima/ima_main.c @@ -985,6 +985,7 @@ void ima_measure_critical_data(const char *event_label, CRITICAL_DATA, 0, event_label, hash); } +EXPORT_SYMBOL_GPL(ima_measure_critical_data); static int __init init_ima(void) { |