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: <202307010010.uGvpzuSy-lkp@intel.com>
Date:   Sat, 1 Jul 2023 00:58:11 +0800
From:   kernel test robot <lkp@...el.com>
To:     Chuck Lever <chuck.lever@...cle.com>
Cc:     oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
        Simo Sorce <simo@...hat.com>
Subject: net/sunrpc/auth_gss/gss_krb5_mech.c:325 gss_krb5_lookup_enctype()
 warn: unsigned 'i' is never less than zero.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   e55e5df193d247a38a5e1ac65a5316a0adcc22fa
commit: ddd8c1f975ee7c2fc60ea836540b5b10f97ac919 SUNRPC: Export get_gss_krb5_enctype()
date:   4 months ago
config: x86_64-randconfig-m001-20230629 (https://download.01.org/0day-ci/archive/20230701/202307010010.uGvpzuSy-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230701/202307010010.uGvpzuSy-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/202307010010.uGvpzuSy-lkp@intel.com/

New smatch warnings:
net/sunrpc/auth_gss/gss_krb5_mech.c:325 gss_krb5_lookup_enctype() warn: unsigned 'i' is never less than zero.
net/sunrpc/auth_gss/gss_krb5_mech.c:325 gss_krb5_lookup_enctype() warn: unsigned 'i' is never less than zero.

Old smatch warnings:
net/sunrpc/auth_gss/gss_krb5_mech.c:301 gss_krb5_prepare_enctype_priority_list() warn: unsigned 'i' is never less than zero.
net/sunrpc/auth_gss/gss_krb5_mech.c:301 gss_krb5_prepare_enctype_priority_list() warn: unsigned 'i' is never less than zero.
net/sunrpc/auth_gss/gss_krb5_mech.c:325 gss_krb5_lookup_enctype() warn: we never enter this loop

vim +/i +325 net/sunrpc/auth_gss/gss_krb5_mech.c

   312	
   313	/**
   314	 * gss_krb5_lookup_enctype - Retrieve profile information for a given enctype
   315	 * @etype: ENCTYPE value
   316	 *
   317	 * Returns a pointer to a gss_krb5_enctype structure, or NULL if no
   318	 * matching etype is found.
   319	 */
   320	VISIBLE_IF_KUNIT
   321	const struct gss_krb5_enctype *gss_krb5_lookup_enctype(u32 etype)
   322	{
   323		size_t i;
   324	
 > 325		for (i = 0; i < ARRAY_SIZE(supported_gss_krb5_enctypes); i++)
   326			if (supported_gss_krb5_enctypes[i].etype == etype)
   327				return &supported_gss_krb5_enctypes[i];
   328		return NULL;
   329	}
   330	EXPORT_SYMBOL_IF_KUNIT(gss_krb5_lookup_enctype);
   331	

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