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  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]
Date:   Sat, 8 Aug 2020 14:28:55 +0800
From:   kernel test robot <lkp@...el.com>
To:     Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Bjorn Andersson <bjorn.andersson@...aro.org>
Subject: drivers/soc/qcom/socinfo.c:277 qcom_show_pmic_model() error: buffer
 overflow 'pmic_models' 26 <= 26

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   049eb096da48db0421dd5e358b9b082a1a8a2025
commit: e9247e2ce5778678c8d631e26ef79dbccedbe6d0 soc: qcom: socinfo: fix printing of pmic_model
date:   6 weeks ago
config: x86_64-randconfig-m001-20200808 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

New smatch warnings:
drivers/soc/qcom/socinfo.c:277 qcom_show_pmic_model() error: buffer overflow 'pmic_models' 26 <= 26

Old smatch warnings:
drivers/soc/qcom/socinfo.c:278 qcom_show_pmic_model() error: buffer overflow 'pmic_models' 26 <= 26

vim +/pmic_models +277 drivers/soc/qcom/socinfo.c

   268	
   269	static int qcom_show_pmic_model(struct seq_file *seq, void *p)
   270	{
   271		struct socinfo *socinfo = seq->private;
   272		int model = SOCINFO_MINOR(le32_to_cpu(socinfo->pmic_model));
   273	
   274		if (model < 0)
   275			return -EINVAL;
   276	
 > 277		if (model <= ARRAY_SIZE(pmic_models) && pmic_models[model])
   278			seq_printf(seq, "%s\n", pmic_models[model]);
   279		else
   280			seq_printf(seq, "unknown (%d)\n", model);
   281	
   282		return 0;
   283	}
   284	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (50217 bytes)

Powered by blists - more mailing lists