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>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z6oRaZBeKpIg+4nv@rli9-mobl>
Date: Mon, 10 Feb 2025 22:47:05 +0800
From: Philip Li <philip.li@...el.com>
To: Waiman Long <llong@...hat.com>
CC: kernel test robot <lkp@...el.com>, <oe-kbuild-all@...ts.linux.dev>,
	<linux-kernel@...r.kernel.org>, "Paul E. McKenney" <paulmck@...nel.org>
Subject: Re: net/8021q/vlan.c:241:46: warning: '%.4i' directive output may be
 truncated writing between 4 and 5 bytes into a region of size between 0 and
 15

On Mon, Feb 10, 2025 at 09:24:58AM -0500, Waiman Long wrote:
> On 2/9/25 11:44 PM, kernel test robot wrote:
> > Hi Waiman,
> > 
> > FYI, the error/warning still remains.
> > 
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head:   a64dcfb451e254085a7daee5fe51bf22959d52d3
> > commit: 925da92ba5cb0c82d07cdd5049a07e40f54e9c44 rcu: Avoid unneeded function call in rcu_read_unlock()
> > date:   3 years, 5 months ago
> > config: sparc-randconfig-r122-20240116 (https://download.01.org/0day-ci/archive/20250210/202502101253.TDZbCYh6-lkp@intel.com/config)
> > compiler: sparc-linux-gcc (GCC) 12.4.0
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250210/202502101253.TDZbCYh6-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/202502101253.TDZbCYh6-lkp@intel.com/
> > 
> > All warnings (new ones prefixed by >>):
> > 
> >     net/8021q/vlan.c: In function 'vlan_ioctl_handler':
> >     net/8021q/vlan.c:253:46: warning: '%i' directive output may be truncated writing between 1 and 5 bytes into a region of size between 0 and 15 [-Wformat-truncation=]
> >       253 |                 snprintf(name, IFNAMSIZ, "%s.%i", real_dev->name, vlan_id);
> >           |                                              ^~
> >     In function 'register_vlan_device',
> >         inlined from 'vlan_ioctl_handler' at net/8021q/vlan.c:628:9:
> >     net/8021q/vlan.c:253:42: note: directive argument in the range [0, 65535]
> >       253 |                 snprintf(name, IFNAMSIZ, "%s.%i", real_dev->name, vlan_id);
> >           |                                          ^~~~~~~
> >     net/8021q/vlan.c:253:17: note: 'snprintf' output between 3 and 22 bytes into a destination of size 16
> >       253 |                 snprintf(name, IFNAMSIZ, "%s.%i", real_dev->name, vlan_id);
> >           |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >     net/8021q/vlan.c: In function 'vlan_ioctl_handler':
> > > > net/8021q/vlan.c:241:46: warning: '%.4i' directive output may be truncated writing between 4 and 5 bytes into a region of size between 0 and 15 [-Wformat-truncation=]
> >       241 |                 snprintf(name, IFNAMSIZ, "%s.%.4i", real_dev->name, vlan_id);
> >           |                                              ^~~~
> >     In function 'register_vlan_device',
> >         inlined from 'vlan_ioctl_handler' at net/8021q/vlan.c:628:9:
> >     net/8021q/vlan.c:241:42: note: directive argument in the range [0, 65535]
> >       241 |                 snprintf(name, IFNAMSIZ, "%s.%.4i", real_dev->name, vlan_id);
> >           |                                          ^~~~~~~~~
> >     net/8021q/vlan.c:241:17: note: 'snprintf' output between 6 and 22 bytes into a destination of size 16
> >       241 |                 snprintf(name, IFNAMSIZ, "%s.%.4i", real_dev->name, vlan_id);
> >           |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > 
> > 
> > vim +241 net/8021q/vlan.c
> 
> Why me? I have never touched net/8021q/vlan.c and I don't believe commit
> 925da92ba5cb ("rcu: Avoid unneeded function call in rcu_read_unlock()") has
> anything to do with the snprintf format warnings.

Sorry about this, this is a wrong report and we will fix the
bug in the bot side asap. Sorry for any inconvenience.

> 
> Regards,
> Longman
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ