Herbert Xu
b872f562c8
dm-crypt: Extend state buffer size in crypt_iv_lmk_one
Add a macro CRYPTO_MD5_STATESIZE for the Crypto API export state
size of md5 and use that in dm-crypt instead of relying on the
size of struct md5_state (the latter is currently undergoing a
transition and may shrink).
This commit fixes a crash on 32-bit machines:
Oops: Oops: 0000 [#1] SMP
CPU: 1 UID: 0 PID: 12 Comm: kworker/u16:0 Not tainted 6.16.0-rc2+ #993 PREEMPT(full)
Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 11/12/2020
Workqueue: kcryptd-254:0-1 kcryptd_crypt [dm_crypt]
EIP: __crypto_shash_export+0xf/0x90
Code: 4a c1 c7 40 20 a0 b4 4a c1 81 cf 0e 00 04 08 89 78 50 e9 2b ff ff ff 8d 74 26 00 55 89 e5 57 56 53 89 c3 89 d6 8b 00 8b 40 14 <8b> 50 fc f6 40 13 01 74 04 4a 2b 50 14 85 c9 74 10 89 f2 89 d8 ff
EAX: 303a3435 EBX: c3007c90 ECX: 00000000 EDX: c3007c38
ESI: c3007c38 EDI: c3007c90 EBP: c3007bfc ESP: c3007bf0
DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068 EFLAGS: 00010216
CR0: 80050033 CR2: 303a3431 CR3: 04fbe000 CR4: 00350e90
Call Trace:
crypto_shash_export+0x65/0xc0
crypt_iv_lmk_one+0x106/0x1a0 [dm_crypt]
Fixes: efd62c8552 ("crypto: md5-generic - Use API partial block handling")
Reported-by: Milan Broz <gmazyland@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Tested-by: Milan Broz <gmazyland@gmail.com>
Closes: https://lore.kernel.org/linux-crypto/f1625ddc-e82e-4b77-80c2-dc8e45b54848@gmail.com/T/
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
2025-06-23 13:50:02 +02:00
..
2025-06-13 17:24:21 +08:00
2025-05-05 18:20:45 +08:00
2024-04-02 10:49:38 +08:00
2024-05-09 22:30:51 +03:00
2024-10-05 13:22:04 +08:00
2025-05-19 13:48:20 +08:00
2019-06-20 14:18:33 +08:00
2022-12-02 18:12:40 +08:00
2025-03-02 21:39:34 +00:00
2023-06-05 09:36:35 +02:00
2025-04-23 11:33:46 +08:00
2022-01-18 13:03:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2020-01-09 11:30:53 +08:00
2017-11-02 11:10:55 +01:00
2020-07-16 21:49:04 +10:00
2025-05-12 13:32:53 +08:00
2021-12-17 16:59:48 +11:00
2025-04-16 15:16:21 +08:00
2020-11-20 14:45:33 +11:00
2019-08-22 14:57:33 +10:00
2022-03-03 10:47:50 +12:00
2021-11-26 16:16:50 +11:00
2024-04-12 15:07:52 +08:00
2024-04-12 15:07:52 +08:00
2023-10-01 16:28:15 +08:00
2022-11-11 18:14:59 +08:00
2024-12-21 22:46:24 +08:00
2025-04-23 11:33:47 +08:00
2023-10-27 18:04:30 +08:00
2025-06-23 13:50:02 +02:00
2025-03-20 16:53:53 -07:00
2017-11-02 11:10:55 +01:00
2024-05-13 18:19:09 -06:00
2021-11-26 16:25:17 +11:00
2024-04-02 10:49:38 +08:00
2025-04-14 17:36:41 -07:00
2025-06-23 13:50:02 +02:00
2020-01-16 15:18:12 +08:00
2025-05-12 13:32:53 +08:00
2019-05-30 11:26:32 -07:00
2021-12-17 16:59:48 +11:00
2019-08-05 18:40:19 -04:00
2025-05-05 13:33:02 +08:00
2025-04-28 19:40:54 +08:00
2024-11-02 18:23:24 +08:00
2025-05-05 18:20:45 +08:00
2025-04-28 19:45:26 +08:00
2019-12-11 16:36:54 +08:00
2025-04-23 11:33:48 +08:00
2025-04-23 11:33:47 +08:00
2025-05-05 18:20:45 +08:00
2025-05-05 18:20:46 +08:00
2025-04-23 15:52:47 +08:00
2025-04-16 15:16:21 +08:00
2025-02-22 15:56:03 +08:00
2025-04-23 15:52:47 +08:00
2025-04-23 15:52:47 +08:00
2022-04-08 16:12:46 +08:00
2025-05-05 18:20:44 +08:00
2020-01-09 11:30:53 +08:00
2024-10-02 17:23:23 -04:00
2023-01-06 17:15:47 +08:00