Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Descriptionguazhang@redhat.com
2021-06-21 09:11:28 UTC
Description of problem:
veritysetup dump failed with --no-superblock if format with --no-superblock,
but from veritysetup man page the option should be supported, so please have a look if something was wrong.
Version-Release number of selected component (if applicable):
veritysetup-2.3.6-1.el9.x86_64
5.13.0-0.rc4.33.el9.x86_64
RHEL-9.0.0-20210617.1
How reproducible:
100%
Actual results:
Expected results:
Additional info:
man veritysetup
...
dump <hash_device>
Reports parameters of verity device from on-disk stored superblock.
<options> can be [--no-superblock]
...
# veritysetup format --no-superblock --debug /dev/mapper/vg01-lv01 /dev/md/Rqm
# cryptsetup 2.3.6 processing "veritysetup format --no-superblock --debug /dev/mapper/vg01-lv01 /dev/md/Rqm"
# Running command format.
# Allocating context for crypt device /dev/md/Rqm.
# Trying to open and read device /dev/md/Rqm with direct-io.
# Initialising device-mapper backend library.
# Formatting device /dev/md/Rqm as type VERITY.
# Crypto backend (OpenSSL 1.1.1j FIPS 16 Feb 2021) initialized in cryptsetup library version 2.3.6.
# Detected kernel Linux 5.13.0-0.rc4.33.el9.x86_64 x86_64.
# Setting ciphertext data device to /dev/mapper/vg01-lv01.
# Trying to open and read device /dev/mapper/vg01-lv01 with direct-io.
# Hash creation sha256, data device /dev/mapper/vg01-lv01, data blocks 2621440, hash_device /dev/md/Rqm, offset 0.
# Data device size required: 10737418240 bytes.
# Hash device size required: 84553728 bytes.
# Using 4 hash levels.
VERITY header information for /dev/md/Rqm
UUID:
Hash type: 1
Data blocks: 2621440
Data block size: 4096
Hash block size: 4096
Hash algorithm: sha256
Salt: 34474230c78ba907eb5cd54d3d3af90a5a76d3aa4deca7b945634e804bed1ebd
Root hash: 8234b62b8ab981bb1bea8f9f41919285b03d9d87f3b3f19b06a1a982c588564e
# Releasing crypt device /dev/md/Rqm context.
# Releasing device-mapper backend.
Command successful.
# veritysetup dump --no-superblock --debug /dev/md/Rqm
# cryptsetup 2.3.6 processing "veritysetup dump --no-superblock --debug /dev/md/Rqm"
# Running command dump.
# Allocating context for crypt device /dev/md/Rqm.
# Trying to open and read device /dev/md/Rqm with direct-io.
# Initialising device-mapper backend library.
# Trying to load VERITY crypt type from device /dev/md/Rqm.
# Crypto backend (OpenSSL 1.1.1j FIPS 16 Feb 2021) initialized in cryptsetup library version 2.3.6.
# Detected kernel Linux 5.13.0-0.rc4.33.el9.x86_64 x86_64.
# Reading VERITY header of size 512 on device /dev/md/Rqm, offset 0.
Device /dev/md/Rqm is not a valid VERITY device.
# Releasing crypt device /dev/md/Rqm context.
# Releasing device-mapper backend.
# Closing read only fd for /dev/md/Rqm.
Command failed with code -1 (wrong or missing parameters).
This seems to be a man page bug. The option is completely ignored in code involved in veritysetup dump. Moreover the --no-superblock flag is explicitly forbidden crypt_load() for verity devices and crypt_load is necessary to perform veritysetup dump action.
Description of problem: veritysetup dump failed with --no-superblock if format with --no-superblock, but from veritysetup man page the option should be supported, so please have a look if something was wrong. Version-Release number of selected component (if applicable): veritysetup-2.3.6-1.el9.x86_64 5.13.0-0.rc4.33.el9.x86_64 RHEL-9.0.0-20210617.1 How reproducible: 100% Actual results: Expected results: Additional info: man veritysetup ... dump <hash_device> Reports parameters of verity device from on-disk stored superblock. <options> can be [--no-superblock] ... # veritysetup format --no-superblock --debug /dev/mapper/vg01-lv01 /dev/md/Rqm # cryptsetup 2.3.6 processing "veritysetup format --no-superblock --debug /dev/mapper/vg01-lv01 /dev/md/Rqm" # Running command format. # Allocating context for crypt device /dev/md/Rqm. # Trying to open and read device /dev/md/Rqm with direct-io. # Initialising device-mapper backend library. # Formatting device /dev/md/Rqm as type VERITY. # Crypto backend (OpenSSL 1.1.1j FIPS 16 Feb 2021) initialized in cryptsetup library version 2.3.6. # Detected kernel Linux 5.13.0-0.rc4.33.el9.x86_64 x86_64. # Setting ciphertext data device to /dev/mapper/vg01-lv01. # Trying to open and read device /dev/mapper/vg01-lv01 with direct-io. # Hash creation sha256, data device /dev/mapper/vg01-lv01, data blocks 2621440, hash_device /dev/md/Rqm, offset 0. # Data device size required: 10737418240 bytes. # Hash device size required: 84553728 bytes. # Using 4 hash levels. VERITY header information for /dev/md/Rqm UUID: Hash type: 1 Data blocks: 2621440 Data block size: 4096 Hash block size: 4096 Hash algorithm: sha256 Salt: 34474230c78ba907eb5cd54d3d3af90a5a76d3aa4deca7b945634e804bed1ebd Root hash: 8234b62b8ab981bb1bea8f9f41919285b03d9d87f3b3f19b06a1a982c588564e # Releasing crypt device /dev/md/Rqm context. # Releasing device-mapper backend. Command successful. # veritysetup dump --no-superblock --debug /dev/md/Rqm # cryptsetup 2.3.6 processing "veritysetup dump --no-superblock --debug /dev/md/Rqm" # Running command dump. # Allocating context for crypt device /dev/md/Rqm. # Trying to open and read device /dev/md/Rqm with direct-io. # Initialising device-mapper backend library. # Trying to load VERITY crypt type from device /dev/md/Rqm. # Crypto backend (OpenSSL 1.1.1j FIPS 16 Feb 2021) initialized in cryptsetup library version 2.3.6. # Detected kernel Linux 5.13.0-0.rc4.33.el9.x86_64 x86_64. # Reading VERITY header of size 512 on device /dev/md/Rqm, offset 0. Device /dev/md/Rqm is not a valid VERITY device. # Releasing crypt device /dev/md/Rqm context. # Releasing device-mapper backend. # Closing read only fd for /dev/md/Rqm. Command failed with code -1 (wrong or missing parameters).