]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ALSA: usx2y: validate nrpacks module parameter on probe
authorMurad Masimov <m.masimov@mt-integration.ru>
Mon, 3 Mar 2025 10:04:13 +0000 (13:04 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Mar 2025 11:51:05 +0000 (12:51 +0100)
commite2eebbb52d156dad9dc378ca4c87b1a34cc4b735
tree12f656476fc81d0f851642330ab546ce6efc399b
parentafa9cd90e765e62b3dbb070e38b5788c692e39c1
ALSA: usx2y: validate nrpacks module parameter on probe

[ Upstream commit 172a0f509723fe4741d4b8e9190cf434b18320d8 ]

The module parameter defines number of iso packets per one URB. User is
allowed to set any value to the parameter of type int, which can lead to
various kinds of weird and incorrect behavior like integer overflows,
truncations, etc. Number of packets should be a small non-negative number.

Since this parameter is read-only, its value can be validated on driver
probe.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Murad Masimov <m.masimov@mt-integration.ru>
Link: https://patch.msgid.link/20250303100413.835-1-m.masimov@mt-integration.ru
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/usb/usx2y/usbusx2y.c
sound/usb/usx2y/usbusx2y.h
sound/usb/usx2y/usbusx2yaudio.c