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]
Message-ID: <202501110148.c1kVuj6t-lkp@intel.com>
Date: Sat, 11 Jan 2025 01:38:14 +0800
From: kernel test robot <lkp@...el.com>
To: Masahiro Yamada <masahiroy@...nel.org>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: drivers/usb/gadget/function/rndis.c:60:23: warning: '%03d' directive
 writing between 3 and 10 bytes into a region of size 7

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   2144da25584eb10b84252230319b5783f6a83041
commit: df8df5e4bc37e39010cfdf5d50cf726fe08aae5b usb: get rid of 'choice' for legacy gadget drivers
date:   4 years, 10 months ago
config: powerpc64-randconfig-002-20231105 (https://download.01.org/0day-ci/archive/20250111/202501110148.c1kVuj6t-lkp@intel.com/config)
compiler: powerpc64-linux-gcc (GCC) 12.4.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250111/202501110148.c1kVuj6t-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202501110148.c1kVuj6t-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/usb/gadget/function/rndis.c: In function 'rndis_register':
>> drivers/usb/gadget/function/rndis.c:60:23: warning: '%03d' directive writing between 3 and 10 bytes into a region of size 7 [-Wformat-overflow=]
      60 | #define NAME_TEMPLATE "driver/rndis-%03d"
         |                       ^~~~~~~~~~~~~~~~~~~
   drivers/usb/gadget/function/rndis.c:903:31: note: in expansion of macro 'NAME_TEMPLATE'
     903 |                 sprintf(name, NAME_TEMPLATE, i);
         |                               ^~~~~~~~~~~~~
   drivers/usb/gadget/function/rndis.c:60:37: note: format string is defined here
      60 | #define NAME_TEMPLATE "driver/rndis-%03d"
         |                                     ^~~~
   drivers/usb/gadget/function/rndis.c:60:23: note: directive argument in the range [0, 2147483647]
      60 | #define NAME_TEMPLATE "driver/rndis-%03d"
         |                       ^~~~~~~~~~~~~~~~~~~
   drivers/usb/gadget/function/rndis.c:903:31: note: in expansion of macro 'NAME_TEMPLATE'
     903 |                 sprintf(name, NAME_TEMPLATE, i);
         |                               ^~~~~~~~~~~~~
   drivers/usb/gadget/function/rndis.c:903:17: note: 'sprintf' output between 17 and 24 bytes into a destination of size 20
     903 |                 sprintf(name, NAME_TEMPLATE, i);
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for HOTPLUG_PCI_POWERNV
   Depends on [n]: PCI [=y] && HOTPLUG_PCI [=n] && PPC_POWERNV [=y] && EEH [=y]
   Selected by [y]:
   - OCXL [=y] && PPC_POWERNV [=y] && PCI [=y] && EEH [=y]


vim +60 drivers/usb/gadget/function/rndis.c

d6d22922d9070b drivers/usb/gadget/function/rndis.c Andrzej Pietrasiewicz 2015-02-06  59  
d6d22922d9070b drivers/usb/gadget/function/rndis.c Andrzej Pietrasiewicz 2015-02-06 @60  #define	NAME_TEMPLATE "driver/rndis-%03d"
^1da177e4c3f41 drivers/usb/gadget/rndis.c          Linus Torvalds        2005-04-16  61  

:::::: The code at line 60 was first introduced by commit
:::::: d6d22922d9070b660e3dce0a87a94f0b581e803e usb: gadget: rndis: remove the limit of available rndis connections

:::::: TO: Andrzej Pietrasiewicz <andrzej.p@...sung.com>
:::::: CC: Felipe Balbi <balbi@...com>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ