]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ALSA: usb-audio: Use the right limit for PCM OOB check
authorTakashi Iwai <tiwai@suse.de>
Wed, 21 Jan 2026 08:20:20 +0000 (09:20 +0100)
committerTakashi Iwai <tiwai@suse.de>
Wed, 21 Jan 2026 08:22:12 +0000 (09:22 +0100)
commit70b4db7d258118a7464f039112a74ddb49a95b06
tree167c538c37ed447c966a197696b4ceba7ba323e8
parent930e69757b74c3ae083b0c3c7419bfe7f0edc7b2
ALSA: usb-audio: Use the right limit for PCM OOB check

The recent fix commit for addressing the OOB access of PCM URB data
buffer caused a regression on Behringer UMC2020HD device, resulting in
choppy sound.  The fix used ep->max_urb_frames for the upper limit
check, and this is no right value to be referred.

Use the actual buffer size (ctx->buffer_size) as the upper limit
instead, which also avoids the regression on the device above.

Fixes: ef5749ef8b30 ("ALSA: usb-audio: Prevent excessive number of frames")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=220997
Link: https://patch.msgid.link/20260121082025.718748-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/pcm.c