Mikulas Patocka
6b4bf97587
dm integrity: fix memory corruption when tag_size is less than digest size
...
commit 08c1af8f1c upstream.
It is possible to set up dm-integrity in such a way that the
"tag_size" parameter is less than the actual digest size. In this
situation, a part of the digest beyond tag_size is ignored.
In this case, dm-integrity would write beyond the end of the
ic->recalc_tags array and corrupt memory. The corruption happened in
integrity_recalc->integrity_sector_checksum->crypto_shash_final.
Fix this corruption by increasing the tags array so that it has enough
padding at the end to accomodate the loop in integrity_recalc() being
able to write a full digest size for the last member of the tags
array.
Cc: stable@vger.kernel.org # v4.19+
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com >
Signed-off-by: Mike Snitzer <snitzer@kernel.org >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-04-20 09:34:20 +02:00
..
2022-04-08 14:23:01 +02:00
2022-01-27 11:04:53 +01:00
2019-11-05 14:53:03 -05:00
2020-01-07 12:07:08 -05:00
2021-01-24 18:17:20 -07:00
2021-03-04 14:53:54 -05:00
2021-01-24 18:15:57 -07:00
2021-08-10 13:34:23 -04:00
2021-04-19 13:20:31 -04:00
2020-03-27 14:42:51 -04:00
2021-10-12 13:54:10 -04:00
2022-04-08 14:22:57 +02:00
2022-04-08 14:23:33 +02:00
2021-08-10 13:34:23 -04:00
2021-08-10 13:34:23 -04:00
2021-08-31 14:55:09 -07:00
2021-08-10 13:34:23 -04:00
2019-05-16 15:55:48 -07:00
2021-08-10 13:34:23 -04:00
2021-09-02 12:51:41 -07:00
2021-08-20 15:59:47 -04:00
2020-08-04 15:51:28 -04:00
2022-04-20 09:34:20 +02:00
2021-06-28 16:30:13 -04:00
2021-02-26 15:49:51 -07:00
2022-04-13 20:59:05 +02:00
2021-06-15 15:42:03 -04:00
2021-08-10 13:34:23 -04:00
2021-08-10 13:34:23 -04:00
2021-08-10 13:34:23 -04:00
2021-08-10 13:34:23 -04:00
2021-08-20 16:07:36 -04:00
2020-05-15 10:29:36 -04:00
2022-04-20 09:34:13 +02:00
2021-08-10 13:34:23 -04:00
2021-08-10 13:34:23 -04:00
2021-08-10 13:34:23 -04:00
2021-08-10 13:34:23 -04:00
2021-08-10 13:34:23 -04:00
2021-08-10 13:34:23 -04:00
2022-04-13 20:59:06 +02:00
2021-08-10 13:34:23 -04:00
2021-08-10 13:34:23 -04:00
2021-08-10 13:34:23 -04:00
2022-04-08 14:22:57 +02:00
2022-04-08 14:22:57 +02:00
2021-08-10 13:34:23 -04:00
2021-08-10 13:34:23 -04:00
2021-09-09 11:39:57 -07:00
2019-04-25 15:38:52 -04:00
2021-06-04 12:07:22 -04:00
2019-12-05 17:05:24 -05:00
2021-08-10 13:34:23 -04:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:35 -07:00
2021-08-10 13:34:23 -04:00
2021-04-14 14:28:29 -04:00
2021-04-14 14:28:29 -04:00
2021-10-12 13:54:09 -04:00
2021-05-25 16:14:05 -04:00
2020-08-04 15:48:13 -04:00
2020-07-13 11:47:33 -04:00
2021-08-10 13:34:23 -04:00
2020-12-04 18:04:35 -05:00
2021-06-25 15:25:23 -04:00
2021-06-04 12:07:28 -04:00
2021-06-04 12:07:24 -04:00
2021-08-10 13:34:23 -04:00
2020-06-05 14:59:53 -04:00
2022-04-13 20:59:06 +02:00
2021-06-04 12:07:37 -04:00
2021-08-16 10:50:32 -06:00
2021-08-10 13:32:40 -04:00
2020-08-23 17:36:59 -05:00
2021-06-14 22:32:07 -07:00
2020-12-16 13:09:32 -08:00
2021-06-14 22:32:07 -07:00
2021-06-14 22:32:07 -07:00
2020-05-13 12:02:23 -07:00
2021-06-14 22:32:07 -07:00
2022-03-16 14:23:46 +01:00
2022-01-27 11:05:08 +01:00
2022-01-27 11:05:08 +01:00
2019-09-13 13:10:05 -07:00
2019-06-15 01:37:35 -06:00
2022-01-11 15:35:15 +01:00
2021-06-14 22:32:07 -07:00
2021-03-11 07:47:48 -07:00
2019-03-12 10:15:18 -07:00
2021-03-11 07:47:48 -07:00
2022-01-27 11:05:08 +01:00
2020-09-24 16:44:44 -07:00
2021-08-30 19:01:46 -07:00
2021-06-14 22:32:07 -07:00