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

New static analysis issues in v2_10_57_0-88-g8059dbb

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • Lustre 2.11.0
    • Lustre 2.11.0
    • 3
    • 9223372036854775807

    Description

      Found 1 new static analysis issues in v2_10_57_0-88-g8059dbb:

      1. Result of function that may return NULL will be dereferenced
        • lustre/utils/mount_lustre.c: in parse_options, Pointer 'options' returned from call to function 'calloc' at line 269 may be NULL and will be dereferenced at line 296. Also there are 3 similar errors on lines 301, 321, 343.

      TRACEBACK:

      • mount_lustre.c:269: 'options' is assigned the return value from function 'calloc'.
      • mount_lustre.c:299: __builtin_constant_p(5) is true
      • mount_lustre.c:299: (_builtin_constant_p(arg) &&strlen(arg) < ( (size_t) (5) ) ) || (_builtin_constant_p("nosvc") &&strlen("nosvc") < ( (size_t) (5) ) ) is false
      • mount_lustre.c:299: ( (_builtin_constant_p(5) && ( (builtin_constant_p(arg) &&strlen(arg) < ( (size_t) (5) ) ) || (builtin_constant_p("nosvc") &&strlen("nosvc") < ( (size_t) (5) ) ) )? ( {size_t __s1_len __s2_len; (builtin_constant_p(arg) &&builtin_constant_p("nosvc") && (s1_len=strlen(arg) ,s2_len=strlen("nosvc") , ( ! ( (size_t) (const void_ ) ( (arg) +1) - (size_t) (const void* ) (arg) ==1) ||_s1_len>=4) && ( ! ( (size_t) (const void* ) ( ("nosvc") +1) - (size_t) (const void* ) ("nosvc") ==1) ||s2_len>=4) )?builtin_strcmp(arg, "nosvc" ) : (builtin_constant_p(arg) && ( (size_t) (const void* ) ( (arg) +1) - (size_t) (const void* ) (arg) ==1) && (s1_len=strlen(arg) ,s1_len<4)? (builtin_constant_p("nosvc") && ( (size_t) (const void* ) ( ("nosvc") +1) - (size_t) (const void* ) ("nosvc") ==1)?builtin_strcmp(arg, "nosvc" ) : ( ( {const unsigned char*_s2= (const unsigned char* ) (const char* ) ("nosvc") ;register int __result= ( ( (const unsigned char* ) (const char* ) (arg) )(...)
      • mount_lustre.c:304: _builtin_constant_p(opt) &&builtin_constant_p("force") && (s1_len=strlen(opt) ,s2_len=strlen("force") , ( ! ( (size_t) (const void_ ) ( (opt) +1) - (size_t) (const void* ) (opt) ==1) ||_s1_len>=4) && ( ! ( (size_t) (const void* ) ( ("force") +1) - (size_t) (const void* ) ("force") ==1) ||_s2_len>=4) ) is false
      • mount_lustre.c:304: _builtin_constant_p(opt) && ( (size_t) (const void_ ) ( (opt) +1) - (size_t) (const void* ) (opt) ==1) && (_s1_len=strlen(opt) ,_s1_len<4) is false
      • mount_lustre.c:304: _builtin_constant_p("force") && ( (size_t) (const void_ ) ( ("force") +1) - (size_t) (const void* ) ("force") ==1) && (_s2_len=strlen("force") ,_s2_len<4) is false
      • mount_lustre.c:319: parse_one_option(opt, flagp) ==0 is false
      • mount_lustre.c:272: __builtin_constant_p(",") && ( (size_t) (const void ) ( (",") +1) - (size_t) (const void* ) (",") ==1) is false
      • mount_lustre.c:272: _builtin_constant_p(",") && ( (size_t) (const void_ ) ( (",") +1) - (size_t) (const void* ) (",") ==1) && (__r0= ( (const char* ) (",") ) [0] , ( (const char* ) (",") ) [0] !=0) is false
      • mount_lustre.c:296: 'options' is dereferenced by passing argument 1 to function 'append_option'.
      • mount_lustre.c:238: 'options' is passed to function 'append_option'.
      • mount_lustre.c:242: 'options' is explicitly dereferenced. 

      The list of commits since the previous build v2_10_57_0-57-g98ddc99:

      8059dbb -LU-10554- lnet: Remove LASSERT on userspace data
      f632910 LU-8602 gss: Fix autoconf check for crypto_hash
      955e096 -LU-10563- kernel: kernel update RHEL7.4 [3.10.0-693.17.1.el7]
      8b3cb15 -LU-10565- mdc: add __GFP_COLD for back compatible
      7db3837 -LU-10565- osd: use readdir while iterate is kabi_extend
      a4ac52a LU-10560 libcfs: remove extra headers from linux-debug.c
      4cbcea2 -LU-10497- tests: remove tests from sanity-dom
      be77f4b -LU-8028- build: fix make dependencies for --disable-modules
      8ef3ddd -LU-4277- scripts: ofd status integrated with zpool status
      859b7a4 -LU-10452- lnet: cleanup YAML output
      70e1532 -LU-9158- quota: adjust quota ASAP
      73f15ad -LU-9378- utils: split getstripe and find from lfs.1
      8a71fd5 -LU-5152- quota: enforce block quota for chgrp
      a6fb2bb -LU-10193- tests: test migration between ldiskfs and zfs
      a48853c -LU-10193- osd-ldiskfs: backup index object with plain format
      6ff1630 -LU-10193- osd-zfs: backup index object with plain format
      027a723 -LU-9564- build: Add server-build for Ubuntu with Kernel 4.4.0
      7c9ffea -LU-9919- lnet: safe access in debug print
      5fee5b7 -LU-7501- utils: clean up lfs argument handling/docs
      942a985 LU-9727 nodemap: add audit_mode flag to nodemap
      416e889 -LU-10513- acl: prepare small buffer for ACL RPC reply
      afef52b LU-9727 lustre: record CLOSE if OPEN was recorded
      21fb4d9 LU-9727 lustre: implement CL_OPEN for Changelogs
      d2629cf LU-9727 lustre: add client NID to Changelogs entries
      b4b7734 -LU-3397- lprocfs: create "export" /proc file on server
      73867dd LU-10003 lnet: clarify lctl deprecation message
      0c9bb26 -LU-6349- idl: add PTLRPC definitions to enum
      8f1c7c1 LU-10418 flr: revise lease API
      b6e718d -LU-9972- osd: cache OI mapping in dt_declare_ref_add
      4930632 LU-7934 tests: compatibility check
      7327f66 -LU-10531- gss: fix GSS support for DNE

      Attachments

        Issue Links

          Activity

            People

              adilger Andreas Dilger
              dmiter Dmitry Eremin (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: