Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-9245

lgss_sk may unsafely overwrite nodemap and fsname fields in keys

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • Lustre 2.10.0
    • Lustre 2.9.0
    • None
    • 4
    • 9223372036854775807

      lgss_sk.c uses strncpy() to modify names of strings for both fsname and nodemap fields. If the replacement string is smaller than the original string, it will not be zero terminated properly. For example, replacing a nodemap name of "default" with "c0" with the lgss_sk utility can result in invalid names such as:

      Nodemap name: c0fault

      I will submit a small patch to switch this to snprintf(), although being a little more verbose, will be safe to use on a parameter of variable length.

            hannac Chris Hanna (Inactive)
            hannac Chris Hanna (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: