All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Muhammad Bilal <meatuni001@gmail.com>
Cc: oe-kbuild-all@lists.linux.dev,
	"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	"Hans de Goede" <hdegoede@redhat.com>,
	"Ilpo Järvinen " <ilpo.jarvinen@linux.intel.com>
Subject: [pdx86-platform-drivers-x86:review-ilpo-next 35/41] drivers/platform/x86/hp/hp-bioscfg/spmobj-attributes.c:49:23: warning: variable 'authlen' is uninitialized when used here
Date: Fri, 18 Sep 2026 04:54:08 +0200	[thread overview]
Message-ID: <202609180411.0EXbMCVf-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git review-ilpo-next
head:   6dd5dfdc96dd33a94f3bf2135d2dcb14f3661d1e
commit: 5714a846afa8d7b8363aa134d4acbd129f68d049 [35/41] platform/x86: hp-bioscfg: fix 16-byte heap overflow for empty auth token
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20260918/202609180411.0EXbMCVf-lkp@intel.com/config)
compiler: clang version 22.1.8 (https://github.com/llvm/llvm-project ca7933e47d3a3451d81e72ac174dcb5aa28b59d1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260918/202609180411.0EXbMCVf-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202609180411.0EXbMCVf-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/platform/x86/hp/hp-bioscfg/spmobj-attributes.c:49:23: warning: variable 'authlen' is uninitialized when used here [-Wuninitialized]
      49 |         size = sizeof(u16) + authlen * sizeof(u16);
         |                              ^~~~~~~
   drivers/platform/x86/hp/hp-bioscfg/spmobj-attributes.c:44:22: note: initialize the variable 'authlen' to silence this warning
      44 |         size_t size, authlen;
         |                             ^
         |                              = 0
   1 warning generated.


vim +/authlen +49 drivers/platform/x86/hp/hp-bioscfg/spmobj-attributes.c

b2715aa2e1352c Jorge Lopez 2023-06-08  33  
b2715aa2e1352c Jorge Lopez 2023-06-08  34  /**
b2715aa2e1352c Jorge Lopez 2023-06-08  35   * hp_calculate_security_buffer() - determines size of security buffer
b2715aa2e1352c Jorge Lopez 2023-06-08  36   * for authentication scheme
b2715aa2e1352c Jorge Lopez 2023-06-08  37   *
b2715aa2e1352c Jorge Lopez 2023-06-08  38   * @authentication: the authentication content
b2715aa2e1352c Jorge Lopez 2023-06-08  39   *
b2715aa2e1352c Jorge Lopez 2023-06-08  40   * Currently only supported type is Admin password
b2715aa2e1352c Jorge Lopez 2023-06-08  41   */
b2715aa2e1352c Jorge Lopez 2023-06-08  42  size_t hp_calculate_security_buffer(const char *authentication)
b2715aa2e1352c Jorge Lopez 2023-06-08  43  {
b2715aa2e1352c Jorge Lopez 2023-06-08  44  	size_t size, authlen;
b2715aa2e1352c Jorge Lopez 2023-06-08  45  
b2715aa2e1352c Jorge Lopez 2023-06-08  46  	if (!authentication)
b2715aa2e1352c Jorge Lopez 2023-06-08  47  		return sizeof(u16) * 2;
b2715aa2e1352c Jorge Lopez 2023-06-08  48  
b2715aa2e1352c Jorge Lopez 2023-06-08 @49  	size = sizeof(u16) + authlen * sizeof(u16);
b2715aa2e1352c Jorge Lopez 2023-06-08  50  	if (!strstarts(authentication, BEAM_PREFIX))
b2715aa2e1352c Jorge Lopez 2023-06-08  51  		size += strlen(UTF_PREFIX) * sizeof(u16);
b2715aa2e1352c Jorge Lopez 2023-06-08  52  
b2715aa2e1352c Jorge Lopez 2023-06-08  53  	return size;
b2715aa2e1352c Jorge Lopez 2023-06-08  54  }
b2715aa2e1352c Jorge Lopez 2023-06-08  55  

:::::: The code at line 49 was first introduced by commit
:::::: b2715aa2e1352c0060b9dcba57a2e465bbfbcd68 platform/x86: hp-bioscfg: spmobj-attributes

:::::: TO: Jorge Lopez <jorge.lopez2@hp.com>
:::::: CC: Hans de Goede <hdegoede@redhat.com>

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

                 reply	other threads:[~2026-09-18  2:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202609180411.0EXbMCVf-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=hdegoede@redhat.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=meatuni001@gmail.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.