Eric Biggers
9c2010bccc
dm-integrity: check mac_size against HASH_MAX_DIGESTSIZE in sb_mac()
...
sb_mac() verifies that the superblock + MAC don't exceed 512 bytes.
Because the superblock is currently 64 bytes, this really verifies
mac_size <= 448. This confuses smatch into thinking that mac_size may
be as large as 448, which is inconsistent with the later code that
assumes the MAC fits in a buffer of size HASH_MAX_DIGESTSIZE (64).
In fact mac_size <= HASH_MAX_DIGESTSIZE is guaranteed by the crypto API,
as that is the whole point of HASH_MAX_DIGESTSIZE. But, let's be
defensive and explicitly check for this. This suppresses the false
positive smatch warning. It does not fix an actual bug.
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202409061401.44rtN1bh-lkp@intel.com/
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
2024-09-11 14:04:41 +02:00
..
2024-07-21 17:56:22 -07:00
2024-08-21 13:12:12 +02:00
2024-08-13 21:14:21 +02:00
2023-02-14 14:23:06 -05:00
2021-10-27 16:53:47 -04:00
2024-02-20 14:22:55 -05:00
2023-03-30 15:57:51 -04:00
2024-04-01 11:53:37 -06:00
2023-02-14 14:23:06 -05:00
2023-02-14 14:23:06 -05:00
2024-08-22 18:32:55 +02:00
2023-02-14 14:23:07 -05:00
2023-02-14 14:23:06 -05:00
2023-02-14 14:23:06 -05:00
2023-02-14 14:23:06 -05:00
2024-07-19 12:08:15 +02:00
2023-02-14 14:23:06 -05:00
2023-02-14 14:23:06 -05:00
2024-02-20 14:22:55 -05:00
2023-02-14 14:23:06 -05:00
2023-02-14 14:23:06 -05:00
2024-07-10 13:10:06 +02:00
2024-09-02 16:53:53 +02:00
2024-07-10 13:10:06 +02:00
2024-06-26 11:32:39 -04:00
2024-08-21 15:36:27 +02:00
2024-05-09 09:10:58 -04:00
2024-02-20 14:22:55 -05:00
2024-07-10 13:10:06 +02:00
2024-07-19 12:08:15 +02:00
2023-02-14 14:23:06 -05:00
2023-02-14 14:23:06 -05:00
2024-02-20 14:22:55 -05:00
2023-02-14 14:23:07 -05:00
2023-02-14 14:23:07 -05:00
2024-07-02 20:53:41 +02:00
2024-09-11 14:04:41 +02:00
2023-02-14 14:23:07 -05:00
2023-02-14 14:23:06 -05:00
2024-07-02 12:00:43 +02:00
2024-08-13 13:51:34 +02:00
2024-02-20 14:22:51 -05:00
2024-06-26 11:32:39 -04:00
2024-02-20 14:22:55 -05:00
2023-02-14 14:23:07 -05:00
2023-02-14 14:23:06 -05:00
2024-05-20 15:51:19 -04:00
2024-02-20 14:22:55 -05:00
2024-07-10 13:10:06 +02:00
2023-02-14 14:23:06 -05:00
2023-02-14 14:23:07 -05:00
2023-02-14 14:23:06 -05:00
2023-02-14 14:23:06 -05:00
2023-02-14 14:23:06 -05:00
2023-02-14 14:23:06 -05:00
2024-02-20 14:22:55 -05:00
2023-02-14 14:23:06 -05:00
2024-02-20 14:22:51 -05:00
2024-07-10 13:10:06 +02:00
2024-02-20 14:22:55 -05:00
2023-02-14 14:23:07 -05:00
2023-02-14 14:23:06 -05:00
2024-02-20 14:22:51 -05:00
2023-02-14 14:23:07 -05:00
2024-05-20 15:51:19 -04:00
2024-01-30 14:06:44 -05:00
2023-03-16 13:37:06 -04:00
2024-07-10 13:10:06 +02:00
2023-04-11 12:09:08 -04:00
2023-02-14 14:23:08 -05:00
2024-07-12 12:39:06 -04:00
2024-05-20 15:51:19 -04:00
2024-07-19 12:08:15 +02:00
2023-02-14 14:23:06 -05:00
2024-09-02 11:41:11 +02:00
2023-02-14 14:23:06 -05:00
2023-02-14 14:23:06 -05:00
2023-04-11 12:09:08 -04:00
2024-07-03 21:41:11 +02:00
2024-07-03 21:41:11 +02:00
2023-06-28 10:43:04 -07:00
2024-07-10 13:10:06 +02:00
2024-07-03 21:41:11 +02:00
2023-02-14 14:23:06 -05:00
2024-07-03 21:41:11 +02:00
2024-02-20 14:22:55 -05:00
2024-05-20 15:51:19 -04:00
2024-07-05 00:42:04 -06:00
2024-02-12 08:41:16 -07:00
2021-06-04 12:07:24 -04:00
2024-07-10 13:10:06 +02:00
2022-07-14 12:14:31 -06:00
2024-08-13 13:50:45 +02:00
2024-08-21 13:12:12 +02:00
2024-07-03 21:41:11 +02:00
2024-02-20 13:43:17 -05:00
2023-12-19 10:16:51 -08:00
2024-06-11 21:22:21 +00:00
2023-07-27 00:13:29 -07:00
2024-07-22 11:32:05 -07:00
2024-07-12 01:30:18 +00:00
2024-07-12 01:30:18 +00:00
2024-07-04 06:20:27 +00:00
2024-06-26 09:37:35 -06:00
2023-06-30 15:43:50 -07:00
2024-02-29 22:49:46 -08:00
2024-08-15 13:38:17 -07:00
2024-02-29 22:49:45 -08:00
2023-11-27 15:49:05 -08:00
2022-08-02 17:14:31 -06:00
2024-03-06 08:59:53 -08:00
2024-07-04 06:35:19 +00:00
2023-11-27 15:49:05 -08:00
2024-06-26 09:37:35 -06:00
2023-07-27 00:13:29 -07:00