[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 8/9] cryptodisk: Fix cipher IV mode 'plain64' always being set as
From: |
Patrick Steinhardt |
Subject: |
[PATCH 8/9] cryptodisk: Fix cipher IV mode 'plain64' always being set as 'plain' |
Date: |
Sun, 23 Aug 2020 13:04:35 +0200 |
From: Glenn Washburn <development@efficientek.com>
Signed-off-by: Glenn Washburn <development@efficientek.com>
Reviewed-by: Patrick Steinhardt <ps@pks.im>
---
grub-core/disk/cryptodisk.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/grub-core/disk/cryptodisk.c b/grub-core/disk/cryptodisk.c
index 76ec2d4b9..74ab54eaa 100644
--- a/grub-core/disk/cryptodisk.c
+++ b/grub-core/disk/cryptodisk.c
@@ -501,10 +501,10 @@ grub_cryptodisk_setcipher (grub_cryptodisk_t crypt, const
char *ciphername, cons
if (cipheriv == NULL)
;
- else if (grub_memcmp (cipheriv, "plain", sizeof ("plain") - 1) == 0)
- mode_iv = GRUB_CRYPTODISK_MODE_IV_PLAIN;
else if (grub_memcmp (cipheriv, "plain64", sizeof ("plain64") - 1) == 0)
mode_iv = GRUB_CRYPTODISK_MODE_IV_PLAIN64;
+ else if (grub_memcmp (cipheriv, "plain", sizeof ("plain") - 1) == 0)
+ mode_iv = GRUB_CRYPTODISK_MODE_IV_PLAIN;
else if (grub_memcmp (cipheriv, "benbi", sizeof ("benbi") - 1) == 0)
{
if (cipher->cipher->blocksize & (cipher->cipher->blocksize - 1)
--
2.28.0
signature.asc
Description: PGP signature
- [PATCH 2/9] luks: Fix out-of-bounds copy of UUID, (continued)
- [PATCH 2/9] luks: Fix out-of-bounds copy of UUID, Patrick Steinhardt, 2020/08/23
- [PATCH 3/9] luks2: Fix use of incorrect index and some error messages, Patrick Steinhardt, 2020/08/23
- [PATCH 4/9] luks2: grub_cryptodisk_t->total_length is the max number of device native sectors, Patrick Steinhardt, 2020/08/23
- [PATCH 5/9] luks2: Improve error reporting when decrypting/verifying key, Patrick Steinhardt, 2020/08/23
- [PATCH 6/9] cryptodisk: Unregister cryptomount command when removing module, Patrick Steinhardt, 2020/08/23
- [PATCH 7/9] cryptodisk: Incorrect calculation of start sector for grub_disk_read in grub_cryptodisk_read, Patrick Steinhardt, 2020/08/23
- [PATCH 8/9] cryptodisk: Fix cipher IV mode 'plain64' always being set as 'plain',
Patrick Steinhardt <=
- [PATCH 9/9] cryptodisk: Properly handle non-512 byte sized sectors, Patrick Steinhardt, 2020/08/23
- Re: [PATCH 0/9] Cryptodisk fixes for v2.06, Glenn Washburn, 2020/08/24
- [PATCH v2 0/9] Cryptodisk fixes for v2.06, Patrick Steinhardt, 2020/08/26
- [PATCH v2 1/9] json: Remove invalid typedef redefinition, Patrick Steinhardt, 2020/08/26
- [PATCH v2 2/9] luks: Fix out-of-bounds copy of UUID, Patrick Steinhardt, 2020/08/26
- [PATCH v2 3/9] luks2: Fix use of incorrect index and some error messages, Patrick Steinhardt, 2020/08/26
- [PATCH v2 4/9] luks2: grub_cryptodisk_t->total_length is the max number of device native sectors, Patrick Steinhardt, 2020/08/26
- [PATCH v2 5/9] luks2: Improve error reporting when decrypting/verifying key, Patrick Steinhardt, 2020/08/26
- [PATCH v2 6/9] cryptodisk: Unregister cryptomount command when removing module, Patrick Steinhardt, 2020/08/26