From: Takashi Iwai <tiwai@suse.de>
To: songxiebing <songxiebing@kylinos.cn>
Cc: tiwai@suse.com, perex@perex.cz, linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org,
syzbot+ee73befabe68e7907adf@syzkaller.appspotmail.com
Subject: Re: [PATCH] ALSA: pcm_oss: Fix use-after-free in poll via io_uring
Date: Thu, 30 Apr 2026 08:07:33 +0200 [thread overview]
Message-ID: <87pl3hnfq2.wl-tiwai@suse.de> (raw)
In-Reply-To: <20260430021401.181505-1-songxiebing@kylinos.cn>
On Thu, 30 Apr 2026 04:14:01 +0200,
songxiebing wrote:
>
> From: Bob Song <songxiebing@kylinos.cn>
>
> Fix use-after-free bug in snd_pcm_oss_poll() caused by
> io_uring asynchronous poll operations accessing already-freed
> pcm_oss_file private data.
>
> The bug happens because file->private_data still points to
> kfree()'d memory after snd_pcm_oss_release(), and io_uring
> may invoke ->poll() handler later.
>
> Fix by:
> 1. Clearing file->private_data early in release function
> 2. Adding NULL check in release to avoid invalid access
> 3. Adding NULL check in poll handler to prevent UAF
>
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") /* pcm_oss initial */
> Reported-by: syzbot+ee73befabe68e7907adf@syzkaller.appspotmail.com
> Closes: https://lore.kernel.org/alsa-devel/000000000000f1068105f20e5e8f@google.com/
This is a very old report. Are you sure that it's still valid with
the latest kernel?
I believe this kind of bug should have been already fixed.
(And above all, the suggested code change doesn't look enough as a
proper fix.)
The same question applied for your other two patches for rawmidi and
PCM UAFs.
thanks,
Takashi
prev parent reply other threads:[~2026-04-30 6:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-30 2:14 [PATCH] ALSA: pcm_oss: Fix use-after-free in poll via io_uring songxiebing
2026-04-30 6:07 ` 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=87pl3hnfq2.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=songxiebing@kylinos.cn \
--cc=syzbot+ee73befabe68e7907adf@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