ALSA: usb-audio: Fix a DMA to stack memory bug
commit f7d306b4 upstream. The usb_get_descriptor() function does DMA so we're not allowed to use a stack buffer for that. Doing DMA to the stack is not portable all architectures. Move the "new_device_descriptor" from being stored on the stack and allocate it with kmalloc() instead. Fixes: b909df18 ("ALSA: usb-audio: Fix potential out-of-bound accesses for Extigy and Mbox devices") Cc: stable@kernel.org Signed-off-by:Dan Carpenter <dan.carpenter@linaro.org> Link: https://patch.msgid.link/60e3aa09-039d-46d2-934c-6f123026c2eb@stanley.mountain Signed-off-by:
Takashi Iwai <tiwai@suse.de> Signed-off-by:
Benoît Sevens <bsevens@google.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Loading
-
mentioned in commit eeccb292
-
mentioned in commit 0a220832
-
mentioned in commit b8c4bbed
-
mentioned in commit 05d8b2fa
-
mentioned in commit 529c7f4d
-
mentioned in commit de83cbfe
-
mentioned in commit 86e45e52
-
mentioned in commit 7f137528
-
mentioned in commit 693e79de
-
mentioned in commit d9174f18
-
mentioned in commit 9af6dd05
-
mentioned in commit 4d7923a7
-
mentioned in commit 89be8631
Please sign in to comment