diff options
| author | Takashi Iwai <tiwai@suse.de> | 2026-09-03 18:04:39 +0200 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2026-09-06 10:01:42 +0200 |
| commit | 9fe49dbc023e82dfaee7b245997d820d01742a9a (patch) | |
| tree | e915325f4a5a31f89b14fb0162fce9621b60ed25 /scripts/Makefile.thinlto | |
| parent | 7a8e247dab54a42aeec0240153c55da286ac5aef (diff) | |
| download | linux-9fe49dbc023e82dfaee7b245997d820d01742a9a.tar.gz linux-9fe49dbc023e82dfaee7b245997d820d01742a9a.zip | |
ALSA: usb: 6fire: Avoid embedded URBs
The USB 6fire driver uses URBs embedded in different structs for PCM,
MIDI and communication, and this is basically a buggy implementation
nowadays; since a URB is managed with a refcount, this may lead to a
UAF when the URB is released asynchronously.
For addressing the problem, this patch converts those embedded URBs to
ones that are properly allocated via usb_alloc_urb(). The
pcm_urb.packets[] is gone, as it's allocated by usb_alloc_urb(), hence
it's found in urb.iso_frame_desc[] instead.
The conversions are rather straightforward; each embedded struct urb
is changed to a pointer, and its callers are updated accordingly.
The resource for those structs are released in the common destructor
functions (usb6fire_comm_free(), etc), which are called at both the
init error path and the disconnect.
No functional changes, only compile-tested.
Link: https://lore.kernel.org/20260903130757.0668310a.michal.pecio@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260903160458.1938392-4-tiwai@suse.de
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
