• Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Undefined Undefined
    • rhel-9.4
    • rhel-9.4
    • libnvme
    • None
    • None
    • Important
    • sst_storage_io
    • ssg_platform_storage
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • Red Hat Enterprise Linux
    • None
    • None
    • None
    • All
    • None

      A number of stack smashing issues were reported across several userspace components that use libnvme, on all distros across variety of PCIe NVMe drives.

      As explained in https://github.com/linux-nvme/nvme-cli/pull/2051:

      The kernel supports since v5.2 direct mapped DMA buffers to userspace.
      Up to this point a bounce buffer was involved. Because the buffers are
      now directly accessed by the device, the rules of alignment also apply
      for the payloads.

      Furthermore, ensure that the buffer is a multiple of 4k, because there
      are devices on the market which will always transfer a multiple of 4k,
      even if we ask for less, e.g 512 bytes. This avoid stack smashes.

      The work is tracked upstream in https://github.com/linux-nvme/libnvme/issues/684 and https://github.com/linux-nvme/libnvme/issues/728.

      The most important fix to backport in 9.4 is https://github.com/linux-nvme/libnvme/pull/727. This one has been tested by the community on affected drives.

      There are more related fixes that haven't gone through such extensive testing and may not be as important: https://github.com/linux-nvme/libnvme/pull/731

            mlombard@redhat.com Maurizio Lombardi
            tbzatek Tomáš Bžatek
            Maurizio Lombardi Maurizio Lombardi
            Yi Zhang Yi Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: