Bug 2108404
Summary: | [RHEL9 ] cryptsetup resize failed with cipher capi:cbc(aes)-essiv:sha3-256 | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 9 | Reporter: | guazhang <guazhang> | |
Component: | cryptsetup | Assignee: | Ondrej Kozina <okozina> | |
Status: | CLOSED ERRATA | QA Contact: | guazhang <guazhang> | |
Severity: | medium | Docs Contact: | ||
Priority: | high | |||
Version: | 9.1 | CC: | agk, dkeefe, jbrassow, msnitzer, okozina, prajnoha | |
Target Milestone: | rc | Keywords: | Triaged | |
Target Release: | 9.2 | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | cryptsetup-2.6.0-1.el9 | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 2110810 (view as bug list) | Environment: | ||
Last Closed: | 2023-05-09 08:23:06 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | cryptsetup-2.6.0 | |
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 2110810 |
Description
guazhang@redhat.com
2022-07-19 02:20:05 UTC
> (...)
> # Cipher specs do not match.
> Mismatching parameters on device bBoD.
> (...)
Yup, there's a bug in compare function that supposed to check if resized device matches metadata device. It's unable to compare correctly cipher specification passed in capi format.
Fixed with https://gitlab.com/cryptsetup/cryptsetup/-/commit/3e4c69a01709d35322ffa17c5360608907a207d7 Hi cryptsetup-2.6.0-1.el9.x86_64 [root@intel-chiefriver-02 host]# echo passwdpasswd | cryptsetup --cipher 'capi:cbc(aes)-essiv:sha3-256' --type 'luks2' luksFormat /dev/loop0 -q --pbkdf-force-iterations 1000000 [root@intel-chiefriver-02 host]# echo passwdpasswd | cryptsetup --type 'luks2' open /dev/loop0 bBoD -q [root@intel-chiefriver-02 host]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS loop0 7:0 0 2G 0 loop └─bBoD 253:3 0 2G 0 crypt loop1 7:1 0 3G 0 loop sda 8:0 0 149.1G 0 disk ├─sda1 8:1 0 1G 0 part /boot └─sda2 8:2 0 148G 0 part ├─rhel_intel--chiefriver--02-root 253:0 0 70G 0 lvm / ├─rhel_intel--chiefriver--02-swap 253:1 0 7.8G 0 lvm [SWAP] └─rhel_intel--chiefriver--02-home 253:2 0 70.2G 0 lvm /home sr0 11:0 1 1024M 0 rom [root@intel-chiefriver-02 host]# echo 'passwdpasswd' | cryptsetup -q resize bBoD --size 819200 [root@intel-chiefriver-02 host]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS loop0 7:0 0 2G 0 loop └─bBoD 253:3 0 400M 0 crypt loop1 7:1 0 3G 0 loop sda 8:0 0 149.1G 0 disk ├─sda1 8:1 0 1G 0 part /boot └─sda2 8:2 0 148G 0 part ├─rhel_intel--chiefriver--02-root 253:0 0 70G 0 lvm / ├─rhel_intel--chiefriver--02-swap 253:1 0 7.8G 0 lvm [SWAP] └─rhel_intel--chiefriver--02-home 253:2 0 70.2G 0 lvm /home sr0 11:0 1 1024M 0 rom [root@intel-chiefriver-02 host]# the fixed package test pass. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (cryptsetup bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2023:2534 |