From: Takashi Iwai <tiwai@suse.de>
To: Soham Kute <officialsohamkute@gmail.com>
Cc: tiwai@suse.com, perex@perex.cz, linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org,
syzbot+16b2b67ae905feb8a289@syzkaller.appspotmail.com
Subject: Re: [PATCH] ALSA: pcm: fix use-after-free in snd_pcm_post_stop
Date: Sun, 08 Feb 2026 17:37:54 +0100 [thread overview]
Message-ID: <87o6lz6vj1.wl-tiwai@suse.de> (raw)
In-Reply-To: <20260208102058.9794-1-officialsohamkute@gmail.com>
On Sun, 08 Feb 2026 11:20:58 +0100,
Soham Kute wrote:
>
> syzbot reported a slab-use-after-free in snd_pcm_post_stop() when the
> PCM runtime may already be freed during teardown.
>
> snd_pcm_post_stop() can be called after snd_pcm_detach_substream()
> releases the runtime, leading to a use-after-free when accessing
> runtime state and wait queues.
>
> Add a defensive check to avoid dereferencing a freed runtime pointer.
>
> Reported-by: syzbot+16b2b67ae905feb8a289@syzkaller.appspotmail.com
>
> Signed-off-by: Soham Kute <officialsohamkute@gmail.com>
Thanks for the patch, but IMO it's rather a wrong "fix". It just
papers over some place that had casually a NULL dereference due to a
UAF. That is, this change itself is no fix for UAF, but just trying
to avoid a casual Oops; more worse, it may still happen at another
place if happening at a little bit different moment even if you plug
like that.
If any, we could put such a sanity check with WARN_ON() to indicate
the obvious code flow error. But, still there is no much reason to
put the check only here at this place. After all, the actual UAF must
be fixed in the caller side.
thanks,
Takashi
prev parent reply other threads:[~2026-02-08 16:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-08 10:20 Soham Kute
2026-02-08 16:37 ` Takashi Iwai [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87o6lz6vj1.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=officialsohamkute@gmail.com \
--cc=perex@perex.cz \
--cc=syzbot+16b2b67ae905feb8a289@syzkaller.appspotmail.com \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®