FreeBSD Bugzilla – Attachment 230991 Details for
Bug 261172
GELI boot failing with aes_xts_reinit: invalid IV length
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
geliboot_iv.patch
file_261172.txt (text/plain), 1.20 KB, created by
John Baldwin
on 2022-01-13 16:39:28 UTC
(
hide
)
Description:
geliboot_iv.patch
Filename:
MIME Type:
Creator:
John Baldwin
Created:
2022-01-13 16:39:28 UTC
Size:
1.20 KB
patch
obsolete
>diff --git a/stand/libsa/geli/geliboot_crypto.c b/stand/libsa/geli/geliboot_crypto.c >index 766f908d9037..f4e46cab6df7 100644 >--- a/stand/libsa/geli/geliboot_crypto.c >+++ b/stand/libsa/geli/geliboot_crypto.c >@@ -36,7 +36,7 @@ > > int > geliboot_crypt(u_int algo, geli_op_t enc, u_char *data, size_t datasize, >- const u_char *key, size_t keysize, u_char *iv, size_t ivlen) >+ const u_char *key, size_t keysize, u_char *iv) > { > keyInstance aeskey; > cipherInstance cipher; >@@ -81,7 +81,7 @@ geliboot_crypt(u_int algo, geli_op_t enc, u_char *data, size_t datasize, > ctxp = &xtsctx; > > enc_xform_aes_xts.setkey(ctxp, key, xts_len / 8); >- enc_xform_aes_xts.reinit(ctxp, iv, ivlen); >+ enc_xform_aes_xts.reinit(ctxp, iv, AES_XTS_IV_LEN); > > switch (enc) { > case GELI_DECRYPT: >@@ -106,11 +106,10 @@ static int > g_eli_crypto_cipher(u_int algo, geli_op_t enc, u_char *data, size_t datasize, > const u_char *key, size_t keysize) > { >- u_char iv[keysize]; >+ u_char iv[AES_BLOCK_LEN]; > > explicit_bzero(iv, sizeof(iv)); >- return (geliboot_crypt(algo, enc, data, datasize, key, keysize, iv, >- sizeof(iv))); >+ return (geliboot_crypt(algo, enc, data, datasize, key, keysize, iv)); > } > > int
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 261172
: 230991