lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Sun, 9 Oct 2022 22:39:05 +0800
From:   kernel test robot <lkp@...el.com>
To:     Kefeng Wang <wangkefeng.wang@...wei.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Catalin Marinas <catalin.marinas@....com>
Subject: drivers/block/aoe/aoenet.c:42:9: warning: 'strncpy' specified bound
 1024 equals destination size

Hi Kefeng,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   a6afa4199d3d038fbfdff5511f7523b0e30cb774
commit: dd03762ab608e058c8f390ad9cf667e490089796 arm64: Enable KCSAN
date:   10 months ago
config: arm64-randconfig-r021-20221001
compiler: aarch64-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=dd03762ab608e058c8f390ad9cf667e490089796
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout dd03762ab608e058c8f390ad9cf667e490089796
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/block/aoe/ drivers/message/fusion/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

   drivers/block/aoe/aoenet.c: In function 'aoe_iflist_setup':
>> drivers/block/aoe/aoenet.c:42:9: warning: 'strncpy' specified bound 1024 equals destination size [-Wstringop-truncation]
      42 |         strncpy(aoe_iflist, str, IFLISTSZ);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
   drivers/message/fusion/mptctl.c: In function 'mptctl_do_mpt_command':
   drivers/message/fusion/mptctl.c:1823:27: warning: variable 'config_frame' set but not used [-Wunused-but-set-variable]
    1823 |                 Config_t *config_frame;
         |                           ^~~~~~~~~~~~
   drivers/message/fusion/mptctl.c:2003:34: warning: variable 'pScsiTm' set but not used [-Wunused-but-set-variable]
    2003 |                 SCSITaskMgmt_t  *pScsiTm;
         |                                  ^~~~~~~
   drivers/message/fusion/mptctl.c: In function 'mptctl_hp_hostinfo':
   drivers/message/fusion/mptctl.c:2329:33: warning: variable 'retval' set but not used [-Wunused-but-set-variable]
    2329 |         int                     retval;
         |                                 ^~~~~~
   In function 'mptctl_readtest',
       inlined from '__mptctl_ioctl.isra' at drivers/message/fusion/mptctl.c:661:10:
>> drivers/message/fusion/mptctl.c:1494:9: warning: 'strncpy' specified bound 12 equals destination size [-Wstringop-truncation]
    1494 |         strncpy (karg.product, ioc->prod_name, MPT_PRODUCT_LENGTH);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/strncpy +42 drivers/block/aoe/aoenet.c

eb086ec59667df Ed L. Cashin 2012-10-04  38  
03c41c434775c5 Ed L. Cashin 2005-04-29  39  #ifndef MODULE
03c41c434775c5 Ed L. Cashin 2005-04-29  40  static int __init aoe_iflist_setup(char *str)
03c41c434775c5 Ed L. Cashin 2005-04-29  41  {
03c41c434775c5 Ed L. Cashin 2005-04-29 @42  	strncpy(aoe_iflist, str, IFLISTSZ);
03c41c434775c5 Ed L. Cashin 2005-04-29  43  	aoe_iflist[IFLISTSZ - 1] = '\0';
03c41c434775c5 Ed L. Cashin 2005-04-29  44  	return 1;
03c41c434775c5 Ed L. Cashin 2005-04-29  45  }
03c41c434775c5 Ed L. Cashin 2005-04-29  46  

:::::: The code at line 42 was first introduced by commit
:::::: 03c41c434775c52092d17a5031ad8ebaaf555bc4 [PATCH] aoe: improve allowed interfaces configuration

:::::: TO: Ed L Cashin <ecashin@...aid.com>
:::::: CC: Greg KH <gregkh@...e.de>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (164536 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ