]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ALSA: firewire-motu: add bounds check in put_user loop for DSP events
authorJunrui Luo <moonafterrain@outlook.com>
Tue, 9 Dec 2025 05:16:41 +0000 (13:16 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 13:03:39 +0000 (14:03 +0100)
commit8f9e51cf2a2a43d0cd72d3dc0b5ccea3f639c187
treec79bac53edf8032a46a5f2bc07fd46c5bad02b67
parentd48f75972d39537b837f569134e6fd1f05fcc27c
ALSA: firewire-motu: add bounds check in put_user loop for DSP events

[ Upstream commit 298e753880b6ea99ac30df34959a7a03b0878eed ]

In the DSP event handling code, a put_user() loop copies event data.
When the user buffer size is not aligned to 4 bytes, it could overwrite
beyond the buffer boundary.

Fix by adding a bounds check before put_user().

Suggested-by: Takashi Iwai <tiwai@suse.de>
Fixes: 634ec0b2906e ("ALSA: firewire-motu: notify event for parameter change in register DSP model")
Signed-off-by: Junrui Luo <moonafterrain@outlook.com>
Link: https://patch.msgid.link/SYBPR01MB788112C72AF8A1C8C448B4B8AFA3A@SYBPR01MB7881.ausprd01.prod.outlook.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/firewire/motu/motu-hwdep.c