Bug 1643686

Summary: Wrong slot number message
Product: [Fedora] Fedora Reporter: Tamás Szekeres <szekeres.tamas>
Component: cryptsetupAssignee: Milan Broz <gmazyland>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 28CC: agk, gmazyland, okozina
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: cryptsetup-2.0.5-1.fc28 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-11-17 05:22:17 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:
Embargoed:

Description Tamás Szekeres 2018-10-27 10:48:31 UTC
Description of problem:
When I delete slot 1, write the "Key slot 0 removed." Why?

Version-Release number of selected component (if applicable):
cryptsetup 2.0.4

How reproducible:

Steps to Reproduce:
1. sudo cryptsetup -v luksKillSlot /dev/sda5 1

Actual results:

Keyslot 1 is selected for deletion.
Enter any remaining passphrase: 
Key slot 0 unlocked.
Key slot 0 removed.
Command successful.


Expected results:

Keyslot 1 is selected for deletion.
Enter any remaining passphrase: 
Key slot 0 unlocked.
Key slot 1 removed.
Command successful.

Additional info:

Sorry for my poor english!

Comment 1 Milan Broz 2018-10-27 15:14:07 UTC
Yes, it is a bug, it actually prints "removed keyslot 0" everytime in luksKillKeyslot, because it misinterprets exit code from crypt_keyslot_destroy().
But it is just error in message, code wipes the proper keyslot.

Will be fixed in 2.0.5 (that will be released very soon), thanks!

Comment 2 Milan Broz 2018-10-27 15:46:35 UTC
This is the upstream commit fixing the issue
https://gitlab.com/cryptsetup/cryptsetup/commit/7213d5a76bfcea01a531d2d39e0766fa4d92cb94

Comment 3 Tamás Szekeres 2018-10-28 14:29:54 UTC
Thanks for your time!

Comment 4 Fedora Update System 2018-10-29 10:59:50 UTC
cryptsetup-2.0.5-1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-8936092f99

Comment 5 Fedora Update System 2018-10-31 17:30:18 UTC
cryptsetup-2.0.5-1.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-8936092f99

Comment 6 Fedora Update System 2018-11-17 05:22:17 UTC
cryptsetup-2.0.5-1.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.