All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: sound/i2c/other/ak4xxx-adda.c:75 ak4529_reset() error: buffer overflow 'ak->images' 64 <= 255
Date: Thu, 13 Aug 2026 05:21:44 +0800	[thread overview]
Message-ID: <202608130552.Tyon6afY-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: "Cássio Gabriel" <cassiogabrielcontato@gmail.com>
CC: Takashi Iwai <tiwai@suse.de>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   f5bbbfec59b4e2fb7520a91de3df8a6174325d6a
commit: 66f6f543283e91b8899b0dd109d8f15a529e8464 ALSA: i2c: ak4xxx-adda: implement AK4529 reset handling
date:   4 months ago
:::::: branch date: 31 hours ago
:::::: commit date: 4 months ago
config: x86_64-randconfig-161 (https://download.01.org/0day-ci/archive/20260813/202608130552.Tyon6afY-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
smatch: v0.5.0-9187-g5189e3fb

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
| Fixes: 66f6f543283e ("ALSA: i2c: ak4xxx-adda: implement AK4529 reset handling")
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202608130552.Tyon6afY-lkp@intel.com/

New smatch warnings:
sound/i2c/other/ak4xxx-adda.c:75 ak4529_reset() error: buffer overflow 'ak->images' 64 <= 255

Old smatch warnings:
sound/i2c/other/ak4xxx-adda.c:93 ak435X_reset() error: buffer overflow 'ak->images' 64 <= 255

vim +75 sound/i2c/other/ak4xxx-adda.c

cb9d24e4349013 Takashi Iwai   2006-06-27  55  
66f6f543283e91 Cássio Gabriel 2026-04-07  56  /* reset procedure for AK4529 */
66f6f543283e91 Cássio Gabriel 2026-04-07  57  static void ak4529_reset(struct snd_akm4xxx *ak, int state)
66f6f543283e91 Cássio Gabriel 2026-04-07  58  {
66f6f543283e91 Cássio Gabriel 2026-04-07  59  	static const unsigned char regs[] = {
66f6f543283e91 Cássio Gabriel 2026-04-07  60  		0x0a, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
66f6f543283e91 Cássio Gabriel 2026-04-07  61  		0x06, 0x07, 0x0b, 0x0c, 0x08,
66f6f543283e91 Cássio Gabriel 2026-04-07  62  	};
66f6f543283e91 Cássio Gabriel 2026-04-07  63  	unsigned int i;
66f6f543283e91 Cássio Gabriel 2026-04-07  64  	unsigned char reg;
66f6f543283e91 Cássio Gabriel 2026-04-07  65  
66f6f543283e91 Cássio Gabriel 2026-04-07  66  	if (state) {
66f6f543283e91 Cássio Gabriel 2026-04-07  67  		snd_akm4xxx_write(ak, 0, 0x09,
66f6f543283e91 Cássio Gabriel 2026-04-07  68  				  snd_akm4xxx_get(ak, 0, 0x09) & ~0x01);
66f6f543283e91 Cássio Gabriel 2026-04-07  69  		return;
66f6f543283e91 Cássio Gabriel 2026-04-07  70  	}
66f6f543283e91 Cássio Gabriel 2026-04-07  71  
66f6f543283e91 Cássio Gabriel 2026-04-07  72  	for (i = 0; i < ARRAY_SIZE(regs); i++) {
66f6f543283e91 Cássio Gabriel 2026-04-07  73  		reg = regs[i];
66f6f543283e91 Cássio Gabriel 2026-04-07  74  		snd_akm4xxx_write(ak, 0, reg,
66f6f543283e91 Cássio Gabriel 2026-04-07 @75  				  snd_akm4xxx_get(ak, 0, reg));
66f6f543283e91 Cássio Gabriel 2026-04-07  76  	}
66f6f543283e91 Cássio Gabriel 2026-04-07  77  	snd_akm4xxx_write(ak, 0, 0x09,
66f6f543283e91 Cássio Gabriel 2026-04-07  78  			  snd_akm4xxx_get(ak, 0, 0x09) | 0x01);
66f6f543283e91 Cássio Gabriel 2026-04-07  79  }
66f6f543283e91 Cássio Gabriel 2026-04-07  80  

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

             reply	other threads:[~2026-08-12 21:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-12 21:21 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-05-02  3:39 sound/i2c/other/ak4xxx-adda.c:75 ak4529_reset() error: buffer overflow 'ak->images' 64 <= 255 kernel test robot

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=202608130552.Tyon6afY-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=error27@gmail.com \
    --cc=oe-kbuild@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.