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

5 new static analysis issues in lnetconfig

Details

    • Bug
    • Resolution: Fixed
    • Major
    • Lustre 2.7.0
    • Lustre 2.7.0
    • 3
    • 16773

    Description

      Found 5 new static analysis issues in 2.6.91-26-g6b0fa76:

      1. Result of function that may return NULL will be dereferenced
        • lnet/utils/cyaml/cyaml.c: in print_value, Pointer 'node' returned from call to function 'cYAML_ll_pop' at line 886 may be NULL and will be dereferenced at line 888.
      2. Null pointer may be dereferenced
        • lnet/utils/lnetconfig/liblnetconfig.c: in lustre_lnet_show_stats, Null pointer 'root' that comes from line 1120 may be dereferenced at line 1197 (after "goto out" in 1133).
      3. Result of function that can return NULL may be dereferenced
        • lnet/utils/lnetconfig/liblnetconfig.c: in lustre_lnet_show_stats, Pointer 'root' returned from call to function 'cYAML_create_object' at line 1136 may be NULL and may be dereferenced at line 1197.
      4. Possible Buffer Overflow in Following String Operations
        • lnet/utils/lnetconfig/liblnetconfig.c: in liblnetconfig.c, function 'strncpy' will fill whole buffer 'data.cfg_config_u.cfg_net.net_intf' of fixed size (128) with string value and will not leave place for NULL-terminator. Possible buffer boundaries violation in following string operations.
      5. Pointer may be dereferenced after it was positively checked for NULL
        • lnet/utils/lnetconfig/liblnetconfig.c: in lustre_lnet_show_stats, Pointer 'root' checked for NULL at line 1137 may be dereferenced at line 1197.

      Attachments

        Issue Links

          Activity

            [LU-6021] 5 new static analysis issues in lnetconfig
            adilger Andreas Dilger made changes -
            Link New: This issue is related to LU-4629 [ LU-4629 ]
            ashehata Amir Shehata (Inactive) made changes -
            Resolution New: Fixed [ 1 ]
            Status Original: In Progress [ 3 ] New: Resolved [ 5 ]
            ashehata Amir Shehata (Inactive) made changes -
            Status Original: Open [ 1 ] New: In Progress [ 3 ]
            adilger Andreas Dilger made changes -
            Priority Original: Minor [ 4 ] New: Major [ 3 ]
            adilger Andreas Dilger made changes -
            Fix Version/s New: Lustre 2.7.0 [ 10631 ]
            adilger Andreas Dilger made changes -
            Affects Version/s New: Lustre 2.7.0 [ 10631 ]
            adilger Andreas Dilger made changes -
            Assignee Original: WC Triage [ wc-triage ] New: Amir Shehata [ ashehata ]
            dmiter Dmitry Eremin (Inactive) made changes -
            Description Original: Found 5 new static analysis issues in 2.6.91-26-g6b0fa76:
            # *Result of function that may return NULL will be dereferenced*
            #* {{lnet/utils/cyaml/cyaml.c}}: in _print_value_, Pointer 'node' returned from call to function 'cYAML\_ll\_pop' at line 886 may be NULL and will be dereferenced at line 888.
            # *Null pointer may be dereferenced*
            #* {{lnet/utils/lnetconfig/liblnetconfig.c}}: in _lustre_lnet_show_stats_, Null pointer 'root' that comes from line 1120 may be dereferenced at line 1197.
            # *Result of function that can return NULL may be dereferenced*
            #* {{lnet/utils/lnetconfig/liblnetconfig.c}}: in _lustre_lnet_show_stats_, Pointer 'root' returned from call to function 'cYAML\_create\_object' at line 1136 may be NULL and may be dereferenced at line 1197.
            # *Possible Buffer Overflow in Following String Operations*
            #* {{lnet/utils/lnetconfig/liblnetconfig.c}}: in _liblnetconfig.c_, function 'strncpy' will fill whole buffer 'data.cfg\_config\_u.cfg\_net.net\_intf' of fixed size (128) with string value and will not leave place for NULL\-terminator. Possible buffer boundaries violation in following string operations.
            # *Pointer may be dereferenced after it was positively checked for NULL*
            #* {{lnet/utils/lnetconfig/liblnetconfig.c}}: in _lustre_lnet_show_stats_, Pointer 'root' checked for NULL at line 1137 may be dereferenced at line 1197.
            New: Found 5 new static analysis issues in 2.6.91-26-g6b0fa76:
            # *Result of function that may return NULL will be dereferenced*
            #* {{lnet/utils/cyaml/cyaml.c}}: in _print_value_, Pointer 'node' returned from call to function 'cYAML\_ll\_pop' at line 886 may be NULL and will be dereferenced at line 888.
            # *Null pointer may be dereferenced*
            #* {{lnet/utils/lnetconfig/liblnetconfig.c}}: in _lustre_lnet_show_stats_, Null pointer 'root' that comes from line 1120 may be dereferenced at line 1197 (after "goto out" in 1133).
            # *Result of function that can return NULL may be dereferenced*
            #* {{lnet/utils/lnetconfig/liblnetconfig.c}}: in _lustre_lnet_show_stats_, Pointer 'root' returned from call to function 'cYAML\_create\_object' at line 1136 may be NULL and may be dereferenced at line 1197.
            # *Possible Buffer Overflow in Following String Operations*
            #* {{lnet/utils/lnetconfig/liblnetconfig.c}}: in _liblnetconfig.c_, function 'strncpy' will fill whole buffer 'data.cfg\_config\_u.cfg\_net.net\_intf' of fixed size (128) with string value and will not leave place for NULL\-terminator. Possible buffer boundaries violation in following string operations.
            # *Pointer may be dereferenced after it was positively checked for NULL*
            #* {{lnet/utils/lnetconfig/liblnetconfig.c}}: in _lustre_lnet_show_stats_, Pointer 'root' checked for NULL at line 1137 may be dereferenced at line 1197.
            dmiter Dmitry Eremin (Inactive) made changes -
            Description Original: Found 5 new static analysis issues in 2.6.91-26-g6b0fa76:
            # *Result of function that may return NULL will be dereferenced*
            #* {{lnet/utils/cyaml/cyaml.c}}: in _print_value_, Pointer 'node' returned from call to function 'cYAML\_ll\_pop' at line 886 may be NULL and will be dereferenced at line 888.
            # *Null pointer may be dereferenced*
            #* {{lnet/utils/lnetconfig/liblnetconfig.c}}: in _lustre_lnet_show_stats_, Null pointer 'root' that comes from line 1120 may be dereferenced at line 1197.
            # *Result of function that can return NULL may be dereferenced*
            #* {{lnet/utils/lnetconfig/liblnetconfig.c}}: in _lustre_lnet_show_stats_, Pointer 'root' returned from call to function 'cYAML\_create\_object' at line 1136 may be NULL and may be dereferenced at line 1197.
            # *Possible Buffer Overflow in Following String Operations*
            #* {{lnet/utils/lnetconfig/liblnetconfig.c}}: in _liblnetconfig.c_, function 'strncpy' will fill whole buffer 'data.cfg\_config\_u.cfg\_net.net\_intf' of fixed size (128) with string value and will not leave place for NULL\-terminator. Possible buffer boundaries violation in following string operations.
            # *Pointer may be dereferenced after it was positively checked for NULL*
            #* {{lnet/utils/lnetconfig/liblnetconfig.c}}: in _lustre_lnet_show_stats_, Pointer 'root' checked for NULL at line 1137 may be dereferenced at line 1197.

            The list of commits since the previous build 2.6.91-18-g188325f:
            |[6b0fa76|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=6b0fa766a4444cf655e965aba067a07143101966]|LU-6012 scrub: NOT miss to auto detect inconsistent OI mapping|
            |[8b40f51|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=8b40f512cced1329da8913aea8c957d9d896127b]|LU-1445 lod: clean up lod_fld_lookup() return codes|
            |[f0137d8|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=f0137d89fd40ae66aa1d3a180e4e5a6240009dcc]|LU-5885 lfsck: deadlock when remove striped dir|
            |[edf6116|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=edf6116663724467207422dcc0c6120320055cac]|LU-3353 ptlrpc: Suppress error message when imp_sec is freed|
            |[0780fde|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=0780fde4d415aa1f407ed0094f20f30e6f1b0d3a]|LU-3573 osd-zfs: Only advance zap cursor as needed|
            |[50f95dd|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=50f95dd6e5159981f6b950d2fab674955442603b]|LU-4647 nodemap: add tests to sanity-sec for nodemap mapping|
            |[9b1569f|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=9b1569f56a1504e89e29c769900fedcbaad4abe7]|LU-5373 test: ignore command return value in sanity test_33b|
            |[8109c77|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=8109c77007b1ebe2ec7e32a9bc18b682e8a0b0c8]|LU-5909 kernel: kernel update RHEL6.6 [2.6.32-504.1.3.el6]|
            New: Found 5 new static analysis issues in 2.6.91-26-g6b0fa76:
            # *Result of function that may return NULL will be dereferenced*
            #* {{lnet/utils/cyaml/cyaml.c}}: in _print_value_, Pointer 'node' returned from call to function 'cYAML\_ll\_pop' at line 886 may be NULL and will be dereferenced at line 888.
            # *Null pointer may be dereferenced*
            #* {{lnet/utils/lnetconfig/liblnetconfig.c}}: in _lustre_lnet_show_stats_, Null pointer 'root' that comes from line 1120 may be dereferenced at line 1197.
            # *Result of function that can return NULL may be dereferenced*
            #* {{lnet/utils/lnetconfig/liblnetconfig.c}}: in _lustre_lnet_show_stats_, Pointer 'root' returned from call to function 'cYAML\_create\_object' at line 1136 may be NULL and may be dereferenced at line 1197.
            # *Possible Buffer Overflow in Following String Operations*
            #* {{lnet/utils/lnetconfig/liblnetconfig.c}}: in _liblnetconfig.c_, function 'strncpy' will fill whole buffer 'data.cfg\_config\_u.cfg\_net.net\_intf' of fixed size (128) with string value and will not leave place for NULL\-terminator. Possible buffer boundaries violation in following string operations.
            # *Pointer may be dereferenced after it was positively checked for NULL*
            #* {{lnet/utils/lnetconfig/liblnetconfig.c}}: in _lustre_lnet_show_stats_, Pointer 'root' checked for NULL at line 1137 may be dereferenced at line 1197.
            dmiter Dmitry Eremin (Inactive) made changes -
            Summary Original: New static analysis issues in 2.6.91-26-g6b0fa76 New: 5 new static analysis issues in lnetconfig
            dmiter Dmitry Eremin (Inactive) created issue -

            People

              ashehata Amir Shehata (Inactive)
              dmiter Dmitry Eremin (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: