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

copy_from_user() should not use MAX_STRING_SIZE

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.9.0
    • Lustre 2.9.0
    • None
    • 3
    • 9223372036854775807

    Description

      The following codes are incorrect:

      $ git grep "MAX_STRING_SIZE" | grep copy_from_user
      lustre/ldlm/ldlm_resource.c:	if (copy_from_user(dummy, buffer, MAX_STRING_SIZE))
      lustre/obdclass/lprocfs_status.c:	if (copy_from_user(dummy, buffer, MAX_STRING_SIZE))
      

      We should only copy enough bytes to cover count passed in.

      Attachments

        Activity

          People

            yujian Jian Yu
            yujian Jian Yu
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: