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

[RHEL 10.2] cryptsetup and integritysetup status commands report wrong size in its total byte count

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

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • rhel-10.2
    • rhel-10.2
    • cryptsetup
    • None
    • Yes
    • Moderate
    • rhel-storage-crs
    • None
    • False
    • False
    • Hide

      None

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

      How reproducible is this bug?

      Always

      Steps to reproduce

      1. cryptsetup open --type plain /tmp/file --sector-size 4096 xxx
      2. cryptsetup status xxx
      3. Notice the device size in bytes does not mach the real size of device /dev/mapper/xxx

      Expected results

       

      [root@machine cryptsetup]# cryptsetup status xxx
      /dev/mapper/xxx is active.
        type:    PLAIN
        cipher:  aes-xts-plain64
        keysize: 256 [bits]
        key location: dm-crypt
        device:  /dev/loop0
        loop:    /tmp/file
        sector size:  4096 [bytes]
        offset:  0 [512-byte units] (0 [bytes])
        size:    61440 [512-byte units] (31457280 [bytes]) <---- expected value
        mode:    read/write 

       

      Actual results

       

      Example of wrong output:

      [root@machine cryptsetup]# cryptsetup status xxx
      /dev/mapper/xxx is active.
        type:    PLAIN
        cipher:  aes-xts-plain64
        keysize: 256 [bits]
        key location: dm-crypt
        device:  /dev/loop0
        loop:    /tmp/file
        sector size:  4096 [bytes]
        offset:  0 [512-byte units] (0 [bytes])
        size:    61440 [512-byte units] (251658240 [bytes]) <------ look here
        mode:    read/write 

      The device size 61440 secotors (512-byte units) is correct. But the subsequent size 251658240 (in bytes) is wrong.

       

      Reproducible on:

       

      cryptsetup-2.8.1-1.el10

       

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

                Created:
                Updated: