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

potential null pointer dereference in osd_statfs in osd-ldiskfs

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • None
    • Lustre 2.14.0
    • None
    • 3
    • 9223372036854775807

    Description

      here's the code:

      int osd_statfs(const struct lu_env *env, struct dt_device *d,
                      struct obd_statfs *sfs, struct obd_statfs_info *info)
      {
              struct osd_device *osd = osd_dt_dev(d);
              struct super_block *sb = osd_sb(osd);
              struct kstatfs *ksfs;
              __u64 reserved;
              int result = 0;
      
              if (unlikely(osd->od_mnt == NULL))
                      return -EINPROGRESS;
      
      

      the osd_sb is expanded as "osd->od_mnt->mnt_sb" so it does look like we either don't need the check for NUL below or should put the sb assignment after it.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: