* [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
@ 2026-09-18 2:54 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-09-18 2:54 UTC (permalink / raw)
To: Muhammad Bilal
Cc: oe-kbuild-all, Andy Shevchenko, Hans de Goede,
Ilpo Järvinen
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-18 2:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-18 2:54 [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 kernel test robot
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.