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

ll_getname allocates too big of a buffer

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • Lustre 2.8.0
    • None
    • None
    • 3
    • 9223372036854775807

      __getname used in ll_getname allocated PATH_MAX sized 4k buffer that is overkill.
      In fact we only need a single component of the pathname that could not be longer than 255 bytes, so only allocating 256 bytes should be enough.
      Additionally need to check for strncpy_from_user negative return values while at that.

            wc-triage WC Triage
            green Oleg Drokin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: