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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202006080301.Wqms1jjC%lkp@intel.com>
Date:   Mon, 8 Jun 2020 03:14:43 +0800
From:   kernel test robot <lkp@...el.com>
To:     Ajay Singh <ajay.kathat@...rochip.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: drivers/staging/wilc1000/mon.c:232:2: warning: 'strncpy' specified
 bound 16 equals destination size

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   3b69e8b4571125bec1f77f886174fe6cab6b9d75
commit: 6cecbb2c67598db47eac301a5fe09e1bb380a08d staging: wilc1000: remove 'wilc_' prefix from filenames
date:   7 months ago
config: microblaze-randconfig-r014-20200607 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 9.3.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
        git checkout 6cecbb2c67598db47eac301a5fe09e1bb380a08d
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=microblaze 

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

All warnings (new ones prefixed by >>, old ones prefixed by <<):

drivers/staging/wilc1000/mon.c: In function 'wilc_wfi_init_mon_interface':
>> drivers/staging/wilc1000/mon.c:232:2: warning: 'strncpy' specified bound 16 equals destination size [-Wstringop-truncation]
232 |  strncpy(wl->monitor_dev->name, name, IFNAMSIZ);
|  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

vim +/strncpy +232 drivers/staging/wilc1000/mon.c

c5c77ba18ea66a drivers/staging/wilc1000/linux_mon.c Johnny Kim  2015-05-11  216  
588713006ea49d drivers/staging/wilc1000/linux_mon.c Ajay Singh  2019-02-02  217  struct net_device *wilc_wfi_init_mon_interface(struct wilc *wl,
588713006ea49d drivers/staging/wilc1000/linux_mon.c Ajay Singh  2019-02-02  218  					       const char *name,
1b7c69e84bcea7 drivers/staging/wilc1000/linux_mon.c Anchal Jain 2016-03-14  219  					       struct net_device *real_dev)
c5c77ba18ea66a drivers/staging/wilc1000/linux_mon.c Johnny Kim  2015-05-11  220  {
73d359a08b76da drivers/staging/wilc1000/linux_mon.c Ajay Singh  2018-05-02  221  	struct wilc_wfi_mon_priv *priv;
c5c77ba18ea66a drivers/staging/wilc1000/linux_mon.c Johnny Kim  2015-05-11  222  
c5c77ba18ea66a drivers/staging/wilc1000/linux_mon.c Johnny Kim  2015-05-11  223  	/*If monitor interface is already initialized, return it*/
588713006ea49d drivers/staging/wilc1000/linux_mon.c Ajay Singh  2019-02-02  224  	if (wl->monitor_dev)
588713006ea49d drivers/staging/wilc1000/linux_mon.c Ajay Singh  2019-02-02  225  		return wl->monitor_dev;
c5c77ba18ea66a drivers/staging/wilc1000/linux_mon.c Johnny Kim  2015-05-11  226  
588713006ea49d drivers/staging/wilc1000/linux_mon.c Ajay Singh  2019-02-02  227  	wl->monitor_dev = alloc_etherdev(sizeof(struct wilc_wfi_mon_priv));
588713006ea49d drivers/staging/wilc1000/linux_mon.c Ajay Singh  2019-02-02  228  	if (!wl->monitor_dev)
c5c77ba18ea66a drivers/staging/wilc1000/linux_mon.c Johnny Kim  2015-05-11  229  		return NULL;
c5c77ba18ea66a drivers/staging/wilc1000/linux_mon.c Johnny Kim  2015-05-11  230  
588713006ea49d drivers/staging/wilc1000/linux_mon.c Ajay Singh  2019-02-02  231  	wl->monitor_dev->type = ARPHRD_IEEE80211_RADIOTAP;
588713006ea49d drivers/staging/wilc1000/linux_mon.c Ajay Singh  2019-02-02 @232  	strncpy(wl->monitor_dev->name, name, IFNAMSIZ);
588713006ea49d drivers/staging/wilc1000/linux_mon.c Ajay Singh  2019-02-02  233  	wl->monitor_dev->name[IFNAMSIZ - 1] = 0;
588713006ea49d drivers/staging/wilc1000/linux_mon.c Ajay Singh  2019-02-02  234  	wl->monitor_dev->netdev_ops = &wilc_wfi_netdev_ops;
9bc061e8805487 drivers/staging/wilc1000/wilc_mon.c  Ajay Singh  2019-06-26  235  	wl->monitor_dev->needs_free_netdev = true;
588713006ea49d drivers/staging/wilc1000/linux_mon.c Ajay Singh  2019-02-02  236  
588713006ea49d drivers/staging/wilc1000/linux_mon.c Ajay Singh  2019-02-02  237  	if (register_netdevice(wl->monitor_dev)) {
d892c97c889a77 drivers/staging/wilc1000/linux_mon.c Leo Kim     2016-02-22  238  		netdev_err(real_dev, "register_netdevice failed\n");
c5c77ba18ea66a drivers/staging/wilc1000/linux_mon.c Johnny Kim  2015-05-11  239  		return NULL;
c5c77ba18ea66a drivers/staging/wilc1000/linux_mon.c Johnny Kim  2015-05-11  240  	}
588713006ea49d drivers/staging/wilc1000/linux_mon.c Ajay Singh  2019-02-02  241  	priv = netdev_priv(wl->monitor_dev);
60959e53f83988 drivers/staging/wilc1000/linux_mon.c Leo Kim     2016-02-22  242  	if (!priv)
c5c77ba18ea66a drivers/staging/wilc1000/linux_mon.c Johnny Kim  2015-05-11  243  		return NULL;
c5c77ba18ea66a drivers/staging/wilc1000/linux_mon.c Johnny Kim  2015-05-11  244  
c5c77ba18ea66a drivers/staging/wilc1000/linux_mon.c Johnny Kim  2015-05-11  245  	priv->real_ndev = real_dev;
c5c77ba18ea66a drivers/staging/wilc1000/linux_mon.c Johnny Kim  2015-05-11  246  
588713006ea49d drivers/staging/wilc1000/linux_mon.c Ajay Singh  2019-02-02  247  	return wl->monitor_dev;
c5c77ba18ea66a drivers/staging/wilc1000/linux_mon.c Johnny Kim  2015-05-11  248  }
c5c77ba18ea66a drivers/staging/wilc1000/linux_mon.c Johnny Kim  2015-05-11  249  

:::::: The code at line 232 was first introduced by commit
:::::: 588713006ea49d63d4e01aa147e9e3dcb130c783 staging: wilc1000: avoid the use of 'wilc_wfi_mon' static variable

:::::: TO: Ajay Singh <ajay.kathat@...rochip.com>
:::::: CC: Greg Kroah-Hartman <gregkh@...uxfoundation.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (30351 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ