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

lgss_sk may unsafely overwrite nodemap and fsname fields in keys

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: Lustre 2.9.0
    • Fix Version/s: Lustre 2.10.0
    • Labels:
      None
    • Severity:
      4
    • Rank (Obsolete):
      9223372036854775807

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hannac Chris Hanna
                Reporter:
                hannac Chris Hanna
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: