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: <Z_J1kV6P3CgaE5WF@smile.fi.intel.com>
Date: Sun, 6 Apr 2025 15:37:37 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: kernel test robot <lkp@...el.com>
Cc: linux-leds@...r.kernel.org, linux-kernel@...r.kernel.org,
	oe-kbuild-all@...ts.linux.dev, Lee Jones <lee@...nel.org>,
	Pavel Machek <pavel@...nel.org>
Subject: Re: [PATCH v1 1/1] leds: pca955x: Avoid potential overflow when
 filling default_label

On Sat, Apr 05, 2025 at 02:58:17AM +0800, kernel test robot wrote:
> Hi Andy,
> 
> kernel test robot noticed the following build warnings:
> 
> [auto build test WARNING on v6.14]
> [cannot apply to lee-leds/for-leds-next linus/master next-20250404]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch#_base_tree_information]
> 
> url:    https://github.com/intel-lab-lkp/linux/commits/Andy-Shevchenko/leds-pca955x-Avoid-potential-overflow-when-filling-default_label/20250405-003054
> base:   v6.14
> patch link:    https://lore.kernel.org/r/20250404162849.3650361-1-andriy.shevchenko%40linux.intel.com
> patch subject: [PATCH v1 1/1] leds: pca955x: Avoid potential overflow when filling default_label
> config: powerpc-randconfig-003-20250405 (https://download.01.org/0day-ci/archive/20250405/202504050256.SYq06TxB-lkp@intel.com/config)
> compiler: powerpc-linux-gcc (GCC) 8.5.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250405/202504050256.SYq06TxB-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/202504050256.SYq06TxB-lkp@intel.com/
> 
> All warnings (new ones prefixed by >>):
> 
>    drivers/leds/leds-pca955x.c: In function 'pca955x_probe':
> >> drivers/leds/leds-pca955x.c:554:53: warning: '%u' directive output may be truncated writing between 1 and 10 bytes into a region of size 8 [-Wformat-truncation=]
>         snprintf(default_label, sizeof(default_label), "%u", i);
>                                                         ^~
>    drivers/leds/leds-pca955x.c:554:52: note: directive argument in the range [0, 4294967294]
>         snprintf(default_label, sizeof(default_label), "%u", i);
>                                                        ^~~~
>    drivers/leds/leds-pca955x.c:554:5: note: 'snprintf' output between 2 and 11 bytes into a destination of size 8
>         snprintf(default_label, sizeof(default_label), "%u", i);
>         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Nice, different GCC have different level of issue here. I will address this
in v2.

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ