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

[RHEL10.2] Return `True` regardless of parameter validity if VDO technology is available

Linking RHIVOS CVEs to...Migration: Automation ...Sync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Normal Normal
    • None
    • rhel-10.2
    • libblockdev
    • None
    • None
    • None
    • rhel-storage-management
    • None
    • False
    • False
    • Hide

      None

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

      What were you trying to do that didn't work?

      What is the impact of this issue to you?

      Please provide the package NVR for which the bug is seen:

      How reproducible is this bug?:

      Steps to reproduce

      1.  
      2.  
      3.  
          1. Expected Result
            Should return `False` or raise `GError` because:
      • Empty VG name is invalid
      • LV does not exist
      • Operation cannot succeed
          1. Actual Result
            Returns `True`, indicating success, even though:
      • No validation was performed
      • No VDO pool was created or converted
      • No LVM command was executed

       

      *Analysis*:
      1. All function parameters are marked `G_GNUC_UNUSED` - they are completely ignored
      2. Function only calls `bd_lvm_is_tech_avail()` to check if VDO is supported
      3. If VDO is available, returns `True` regardless of parameters
      4. No actual D-Bus method call is made
      5. No LVM operation is performed

       

      Actual results

      The D-Bus implementation of VDO-related functions in `libblockdev` are non-functional stubs that:

      • Ignore all input parameters
      • Do not perform any actual operations
      • Return `True` regardless of parameter validity if VDO technology is available
      • Mislead users into believing operations succeeded when nothing was done

      This causes silent failures and can lead to data loss or system misconfiguration.

       

      ```python
      import gi
      gi.require_version("BlockDev", "3.0")
      from gi.repository import BlockDev as bd

      bd.init(None, None)

      1. Call with obviously invalid parameters
        result = bd.lvm_vdo_pool_convert(
            "",              # Empty VG name (invalid)
            "any_lv",        # Non-existent LV
            "vdo_pool",
            10 * 1024**3,
            256 * 1024**2,
            True,
            True,
            bd.LVMVDOWritePolicy.AUTO,
            None
        )

      print(f"Result: {result}")  # Prints: True (incorrect!)
      ```

       

       

        1. Affected Functions

      The following VDO functions in `lvm-dbus.c` are confirmed stubs:

      Function Line Status
      ---------- ------ --------
      `bd_lvm_vdo_pool_create` ~1750 Stub - returns tech availability only
      `bd_lvm_vdo_pool_convert` ~1800 Stub - returns tech availability only
      `bd_lvm_vdo_pool_resize` ~1850 Stub - returns tech availability only
      `bd_lvm_vdo_resize` ~1900 Stub - returns tech availability only
      `bd_lvm_vdo_enable_compression` ~1950 Stub - returns tech availability only
      `bd_lvm_vdo_disable_compression` ~2000 Stub - returns tech availability only
      `bd_lvm_vdo_enable_deduplication` ~2050 Stub - returns tech availability only
      `bd_lvm_vdo_disable_deduplication` ~2100 Stub - returns tech availability only

       

      libblockdev-3.4.0-2.el10.x86_64

      6.12.0-184.el10.x86_64

       

       

              vtrefny@redhat.com Vojtěch Trefný
              guazhang@redhat.com Guangwu Zhang
              Vojtěch Trefný Vojtěch Trefný
              Guangwu Zhang Guangwu Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: