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:   Tue, 28 Sep 2021 03:31:48 +0800
From:   kernel test robot <lkp@...el.com>
To:     Vivek Goyal <vgoyal@...hat.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Miklos Szeredi <mszeredi@...hat.com>
Subject: fs/fuse/virtio_fs.c:604:9: warning: 'strncpy' specified bound 24
 equals destination size

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   92477dd1faa650e50bd3bb35a6c0b8d09198cc35
commit: b43b7e81eb2b188fab1d8bc334b4b725f6d2ae10 virtiofs: provide a helper function for virtqueue initialization
date:   1 year, 1 month ago
config: arm-randconfig-r025-20210927 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.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=b43b7e81eb2b188fab1d8bc334b4b725f6d2ae10
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout b43b7e81eb2b188fab1d8bc334b4b725f6d2ae10
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arm 

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 >>):

   fs/fuse/virtio_fs.c: In function 'virtio_fs_init_vq':
>> fs/fuse/virtio_fs.c:604:9: warning: 'strncpy' specified bound 24 equals destination size [-Wstringop-truncation]
     604 |         strncpy(fsvq->name, name, VQ_NAME_LEN);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/strncpy +604 fs/fuse/virtio_fs.c

   600	
   601	static void virtio_fs_init_vq(struct virtio_fs_vq *fsvq, char *name,
   602				      int vq_type)
   603	{
 > 604		strncpy(fsvq->name, name, VQ_NAME_LEN);
   605		spin_lock_init(&fsvq->lock);
   606		INIT_LIST_HEAD(&fsvq->queued_reqs);
   607		INIT_LIST_HEAD(&fsvq->end_reqs);
   608		init_completion(&fsvq->in_flight_zero);
   609	
   610		if (vq_type == VQ_REQUEST) {
   611			INIT_WORK(&fsvq->done_work, virtio_fs_requests_done_work);
   612			INIT_DELAYED_WORK(&fsvq->dispatch_work,
   613					  virtio_fs_request_dispatch_work);
   614		} else {
   615			INIT_WORK(&fsvq->done_work, virtio_fs_hiprio_done_work);
   616			INIT_DELAYED_WORK(&fsvq->dispatch_work,
   617					  virtio_fs_hiprio_dispatch_work);
   618		}
   619	}
   620	

---
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" (25774 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ