Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-122297

[RHEL9.8] Cryptsetup/integritysetup fails to format partition with --integrity-inline option

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • rhel-9.8
    • cryptsetup
    • None
    • None
    • None
    • rhel-storage-crs
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • Unspecified
    • Unspecified
    • Unspecified
    • None

      Integritysetup/cryptsetup can not format device partition with --integrity-inline option even though the top level device has proper support for additional metadata sectors (e.g.: advanced format data sector size 4096 bytes + 64 bytes for metadata).

      [root@cryptsetup-storage-01 cryptsetup]# integritysetup format /dev/nvme3n1p1 --integrity-inline -q --sector-size 4096
      Device /dev/nvme3n1p1 does not provide inline integrity data fields.
      

      Wherea on top level device /dev/nvme3n1 I get success:

      [root@cryptsetup-storage-01 cryptsetup]# integritysetup format /dev/nvme3n1 --integrity-inline -q --sector-size 4096 --no-wipe
      [root@cryptsetup-storage-01 cryptsetup]# echo $? 
      0

      The device has proper advanced format support:

      [root@cryptsetup-storage-01 cryptsetup]# nvme id-ns -H /dev/nvme3n1
      (...)
      LBA Format  0 : Metadata Size: 0   bytes - Data Size: 512 bytes - Relative Performance: 0 Best 
      LBA Format  1 : Metadata Size: 8   bytes - Data Size: 512 bytes - Relative Performance: 0 Best 
      LBA Format  2 : Metadata Size: 0   bytes - Data Size: 4096 bytes - Relative Performance: 0 Best 
      LBA Format  3 : Metadata Size: 64  bytes - Data Size: 4096 bytes - Relative Performance: 0 Best (in use) <--------------
       

      This is due to bug in processing of sysfs attributes for partition device nodes. The partition does not provide any integrity profile information and libcryptsetup has to look for it on top level device sysfs kobject.

              khanicov@redhat.com Kristina Hanicova
              okozina@redhat.com Ondrej Kozina
              Ondrej Kozina Ondrej Kozina
              Guangwu Zhang Guangwu Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated: