mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: "Cássio Gabriel" <cassiogabrielcontato@gmail.com>
Cc: Takashi Iwai <tiwai@suse.com>, Jaroslav Kysela <perex@perex.cz>,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
	syzbot+8e498074a794999eb41c@syzkaller.appspotmail.com
Subject: Re: [PATCH] ALSA: pcm: oss: Fix setup list UAF on proc write error
Date: Mon, 25 May 2026 09:23:24 +0200	[thread overview]
Message-ID: <87cxykgdg3.wl-tiwai@suse.de> (raw)
In-Reply-To: <20260522-alsa-pcm-oss-setup-uaf-v1-1-40bdcc4d17e8@gmail.com>

On Sat, 23 May 2026 03:09:40 +0200,
Cássio Gabriel wrote:
> 
> snd_pcm_oss_proc_write() links a newly allocated setup entry into the
> OSS setup list before duplicating the task name. If the task-name
> allocation fails, the error path frees the already linked entry and
> leaves setup_list pointing at freed memory.
> 
> A later OSS device open can then walk the stale list entry in
> snd_pcm_oss_look_for_setup() and dereference freed memory.
> 
> Allocate the task name and initialize the setup entry before publishing
> the entry on setup_list. Also fetch the initial proc read iterator only
> after taking setup_mutex, so all setup_list traversal follows the same
> list lifetime rules.
> 
> Reported-by: syzbot+8e498074a794999eb41c@syzkaller.appspotmail.com
> Closes: https://lore.kernel.org/all/6a1062b7.170a0220.35b2b7.0003.GAE@google.com
> Closes: https://syzkaller.appspot.com/bug?extid=8e498074a794999eb41c
> Fixes: 060d77b9c04a ("[ALSA] Fix / clean up PCM-OSS setup hooks")
> Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>

Applied now.  Thanks.


Takashi

      reply	other threads:[~2026-05-25  7:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-23  1:09 Cássio Gabriel
2026-05-25  7:23 ` 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=87cxykgdg3.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=cassiogabrielcontato@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=syzbot+8e498074a794999eb41c@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®