Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Doruk Tan Ozturk <doruk@0sec.ai>
Cc: tiwai@suse.de, perex@perex.cz, tiwai@suse.com,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ALSA: seq: fix use-after-free of borrowed substream in snd-seq-midi
Date: Mon, 15 Jun 2026 09:26:07 +0200	[thread overview]
Message-ID: <87pl1smfhs.wl-tiwai@suse.de> (raw)
In-Reply-To: <20260615002821.47317-1-doruk@0sec.ai>

On Mon, 15 Jun 2026 02:28:21 +0200,
Doruk Tan Ozturk wrote:
> 
> On Wed, 11 Jun 2026, Takashi Iwai wrote:
> > There has been already a similar fix queued in sound.git tree for-next
> > branch:
> > ef7607ab1c8adc6258fb1b27d08e26aecdc18a58
> >     ALSA: seq: midi: Serialize output teardown with event_input
> >
> > I believe this already addressed the bug.
> >
> > Let me know if there is still anything missing.
> 
> Hi Takashi,
> 
> Thanks for checking, and you're right -- ef7607ab1c8a ("ALSA: seq: midi:
> Serialize output teardown with event_input") addresses the same race my
> patch targeted: event_process_midi() borrowing msynth->output_rfile.output
> while a concurrent midisynth_unuse() releases the rawmidi file and frees
> substream->runtime before snd_rawmidi_kernel_write1() pins the runtime
> buffer. That commit serializes the output_rfile publish/clear and pairs the
> output snapshot with an in-flight reference, which closes the window, so my
> patch is redundant.
> 
> Please drop mine; nothing further needed. Thanks!

Thanks for confirmation!


Takashi

      reply	other threads:[~2026-06-15  7:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-10 20:03 [PATCH] ALSA: seq: fix use-after-free of borrowed substream in snd-seq-midi Doruk Tan Ozturk
2026-06-11  7:25 ` Takashi Iwai
2026-06-15  0:28   ` Doruk Tan Ozturk
2026-06-15  7:26     ` 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=87pl1smfhs.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=doruk@0sec.ai \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --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