Mimi Zohar 0d29174959 ima: detect changes to the backing overlay file
commit b836c4d29f2744200b2af41e14bf50758dddc818 upstream.

Commit 18b44bc5a672 ("ovl: Always reevaluate the file signature for
IMA") forced signature re-evaulation on every file access.

Instead of always re-evaluating the file's integrity, detect a change
to the backing file, by comparing the cached file metadata with the
backing file's metadata.  Verifying just the i_version has not changed
is insufficient.  In addition save and compare the i_ino and s_dev
as well.

Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Tested-by: Eric Snowberg <eric.snowberg@oracle.com>
Tested-by: Raul E Rangel <rrangel@chromium.org>
Cc: stable@vger.kernel.org
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-11-28 17:15:06 +00:00
..
2023-06-26 10:14:36 -07:00
2023-11-20 11:57:09 +01:00
2023-06-27 17:10:27 -07:00
2023-06-26 11:52:12 -07:00
2023-03-14 12:56:30 -06:00
2023-10-19 23:10:56 +02:00
2023-06-15 13:37:53 +02:00
2023-06-26 11:52:12 -07:00
\n
2023-06-29 13:39:51 -07:00
2023-08-08 14:59:49 -07:00
2023-09-23 11:14:34 +02:00
2023-06-28 20:35:21 -07:00
\n
2023-06-29 13:39:51 -07:00
2023-06-26 09:50:21 -07:00
2023-05-17 09:16:59 +02:00
2022-10-10 19:45:17 -07:00
2023-06-26 09:50:21 -07:00
\n
2023-06-29 13:31:44 -07:00
2023-02-20 11:53:11 -08:00
2023-10-19 23:11:08 +02:00
2023-08-12 09:18:47 -07:00
2023-06-26 10:14:36 -07:00
2023-10-19 23:11:08 +02:00
2022-10-10 14:21:11 -07:00
2023-10-19 23:11:08 +02:00
2023-06-26 12:47:20 -07:00
2023-01-19 09:24:30 +01:00
2023-06-26 10:27:04 -07:00
2023-10-19 23:11:08 +02:00
2023-05-19 04:30:22 +02:00
2023-05-19 04:30:22 +02:00
2023-03-06 09:59:20 +01:00
2023-02-20 11:53:11 -08:00
\n
2023-06-29 13:39:51 -07:00
2023-02-20 11:53:11 -08:00