]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ALSA: hda/ca0132: Fix buffer overflow in add_tuning_control
authorLucy Thrun <lucy.thrun@digital-rabbithole.de>
Tue, 10 Jun 2025 17:50:12 +0000 (19:50 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:22:42 +0000 (16:22 +0200)
commitfb8116c38d67d6e23f3b5e34bbc8d9f8c12e81e5
tree7326f5c02b72fa6243b4a35bff4e8db2f6f2a847
parent85b3b3966a276180b9133a1520787685ddb3fb2c
ALSA: hda/ca0132: Fix buffer overflow in add_tuning_control

[ Upstream commit a409c60111e6bb98fcabab2aeaa069daa9434ca0 ]

The 'sprintf' call in 'add_tuning_control' may exceed the 44-byte
buffer if either string argument is too long. This triggers a compiler
warning.
Replaced 'sprintf' with 'snprintf' to limit string lengths to prevent
overflow.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202506100642.95jpuMY1-lkp@intel.com/
Signed-off-by: Lucy Thrun <lucy.thrun@digital-rabbithole.de>
Link: https://patch.msgid.link/20250610175012.918-3-lucy.thrun@digital-rabbithole.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/pci/hda/patch_ca0132.c