Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH] ASoC: wm_adsp_fw_find_test: Fix missing NULL terminator on file name list
@ 2026-03-26 10:08 Richard Fitzgerald
  2026-03-26 10:44 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Fitzgerald @ 2026-03-26 10:08 UTC (permalink / raw)
  To: broonie; +Cc: linux-sound, linux-kernel, patches

The array wm_adsp_fw_find_test_dir_all_files[] needs a NULL terminator.

It was documented at line 41 that dir_files points to a NULL-terminated
array.

   /* NULL-terminated array of pointers to filenames ... <snip> */
   const char * const *dir_files;

This fixes the error reported by KASAN:

[17:46:43] BUG: KASAN: global-out-of-bounds in
  wm_adsp_fw_find_test_pick_file+0x8cc/0xc80
[17:46:43] Read of size 8 at addr ffff800081e5ffe8 by task
  kunit_try_catch/18349

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Fixes: bf2d44d07de7 ("ASoC: wm_adsp: Add kunit test for firmware file search")
---
 sound/soc/codecs/wm_adsp_fw_find_test.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/codecs/wm_adsp_fw_find_test.c b/sound/soc/codecs/wm_adsp_fw_find_test.c
index fb886dc61c27..d0c7fb30a95d 100644
--- a/sound/soc/codecs/wm_adsp_fw_find_test.c
+++ b/sound/soc/codecs/wm_adsp_fw_find_test.c
@@ -1041,6 +1041,7 @@ static const char * const wm_adsp_fw_find_test_dir_all_files[] = {
 	"cirrus/cs1234-dsp1-mbc-vss.bin",
 	"cirrus/wm1234-dsp1-mbc-vss.bin",
 	"wm1234-dsp1-mbc-vss.bin",
+	NULL /* terminator */
 };
 
 /*
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ASoC: wm_adsp_fw_find_test: Fix missing NULL terminator on file name list
  2026-03-26 10:08 [PATCH] ASoC: wm_adsp_fw_find_test: Fix missing NULL terminator on file name list Richard Fitzgerald
@ 2026-03-26 10:44 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2026-03-26 10:44 UTC (permalink / raw)
  To: Richard Fitzgerald; +Cc: linux-sound, linux-kernel, patches

On Thu, 26 Mar 2026 10:08:53 +0000, Richard Fitzgerald wrote:
> ASoC: wm_adsp_fw_find_test: Fix missing NULL terminator on file name list

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.1

Thanks!

[1/1] ASoC: wm_adsp_fw_find_test: Fix missing NULL terminator on file name list
      https://git.kernel.org/broonie/sound/c/951a4e8589b3

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-03-26 16:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-26 10:08 [PATCH] ASoC: wm_adsp_fw_find_test: Fix missing NULL terminator on file name list Richard Fitzgerald
2026-03-26 10:44 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox