mirror of https://github.com/torvalds/linux.git
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:
|
||
|---|---|---|
| .. | ||
| internal | ||
| acompress.h | ||
| aead.h | ||
| aes.h | ||
| akcipher.h | ||
| algapi.h | ||
| arc4.h | ||
| aria.h | ||
| authenc.h | ||
| b128ops.h | ||
| blake2b.h | ||
| blake2s.h | ||
| blowfish.h | ||
| cast5.h | ||
| cast6.h | ||
| cast_common.h | ||
| chacha.h | ||
| chacha20poly1305.h | ||
| cryptd.h | ||
| ctr.h | ||
| curve25519.h | ||
| des.h | ||
| dh.h | ||
| drbg.h | ||
| ecc_curve.h | ||
| ecdh.h | ||
| engine.h | ||
| gcm.h | ||
| gf128mul.h | ||
| ghash.h | ||
| hash.h | ||
| hash_info.h | ||
| hkdf.h | ||
| hmac.h | ||
| if_alg.h | ||
| kdf_sp800108.h | ||
| kpp.h | ||
| krb5.h | ||
| md5.h | ||
| nhpoly1305.h | ||
| null.h | ||
| padlock.h | ||
| pcrypt.h | ||
| pkcs7.h | ||
| poly1305.h | ||
| polyval.h | ||
| public_key.h | ||
| rng.h | ||
| scatterwalk.h | ||
| serpent.h | ||
| sha1.h | ||
| sha1_base.h | ||
| sha2.h | ||
| sha3.h | ||
| sha512_base.h | ||
| sig.h | ||
| skcipher.h | ||
| sm3.h | ||
| sm3_base.h | ||
| sm4.h | ||
| streebog.h | ||
| twofish.h | ||
| utils.h | ||
| xts.h | ||