summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2026-10-20 12:16:20 +0200
committerTakashi Iwai <tiwai@suse.de>2026-10-20 12:58:25 +0200
commit34e3e04b8a1731a773797542f0781e99ce7cd755 (patch)
tree41d5326ea3eef3c61b5559b43b01ae553752045e /scripts/Makefile.thinlto
parent47c3d5b885a4fcf65238c0cc525dd3c1cc65aa89 (diff)
downloadlinux-34e3e04b8a1731a773797542f0781e99ce7cd755.tar.gz
linux-34e3e04b8a1731a773797542f0781e99ce7cd755.zip
ALSA: emux: Fix UAF of soundfont zones at note-on
snd_emux_note_on() looks up the matching zones via snd_soundfont_search_zone(), which takes sflist->lock only during the lookup and returns the raw zone pointers after releasing it. The caller then stores them in vp->zone without any protection. Meanwhile, a concurrent SNDRV_EMUX_IOCTL_REMOVE_LAST_SAMPLES ioctl may unlink and free those zones in snd_soundfont_remove_unlocked(); this leads to a use-after-free in snd_emux_note_on(), and later at accessing the cached vp->zone, e.g. in snd_emux_send_effect(). Fix it by holding sflist->lock in snd_emux_note_on() over the whole zone lookup and voice setup, and let snd_soundfont_search_zone() require the caller to hold the lock, instead. snd_soundfont_lock_preset() takes sflist->lock for setting presets_locked, so the removal path now syncs with the note-on finish. Reported-by: Sashiko <sashiko-bot@kernel.org> Closes: https://sashiko.dev/#/bug/linux-697212bb-a434-4ff5-8778-25a84f5dad89 Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20261020101624.205638-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions