Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: "matteo.cotifava" <cotifavamatteo@gmail.com>
Cc: cujomalainey@chromium.org, lgirdwood@gmail.com,
	 linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org,
	perex@perex.cz,  srini@kernel.org, tiwai@suse.com
Subject: Re: [PATCH v2 0/2] ASoC: soc-core: fix use-after-free in close_delayed_work
Date: Tue, 10 Mar 2026 00:36:28 +0000	[thread overview]
Message-ID: <177310298877.348698.13474858295535281915.b4-ty@kernel.org> (raw)
In-Reply-To: <20260309215412.545628-1-cotifavamatteo@gmail.com>

On Mon, 09 Mar 2026 22:54:10 +0100, matteo.cotifava wrote:
> Fix a use-after-free in snd_soc_dapm_stream_event() triggered when a
> sound card is unbound while a PCM close delayed work is pending.
> 
> As Mark pointed out in v1 review, flush_delayed_work() does handle
> pending timers correctly. The actual issue appears to be new work
> getting scheduled after the flush: snd_card_disconnect_sync() inside
> soc_cleanup_card_resources() can trigger PCM closes which call
> snd_soc_dapm_stream_stop(), scheduling new delayed work after the
> flush in snd_soc_unbind_card() has already completed. If the timer
> fires after soc_remove_link_components() frees the DAPM widgets,
> the work accesses freed memory.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/2] ASoC: soc-core: drop delayed_work_pending() check before flush
      commit: 3c99c9f0ed60582c1c9852b685d78d5d3a50de63
[2/2] ASoC: soc-core: flush delayed work before removing DAIs and widgets
      commit: 95bc5c225513fc3c4ce169563fb5e3929fbb938b

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


      parent reply	other threads:[~2026-03-10  0:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-08 11:09 [PATCH] ASoC: soc-core: fix use-after-free in snd_soc_unbind_card() Matteo Cotifava
2026-03-09 15:01 ` Mark Brown
2026-03-09 21:49   ` matteo.cotifava
2026-03-09 21:54   ` [PATCH v2 0/2] ASoC: soc-core: fix use-after-free in close_delayed_work matteo.cotifava
2026-03-09 21:54     ` [PATCH v2 1/2] ASoC: soc-core: drop delayed_work_pending() check before flush matteo.cotifava
2026-03-09 21:54     ` [PATCH v2 2/2] ASoC: soc-core: flush delayed work before removing DAIs and widgets matteo.cotifava
2026-03-09 22:08     ` [PATCH v2 0/2] ASoC: soc-core: fix use-after-free in close_delayed_work Mark Brown
2026-03-10  0:36     ` Mark Brown [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=177310298877.348698.13474858295535281915.b4-ty@kernel.org \
    --to=broonie@kernel.org \
    --cc=cotifavamatteo@gmail.com \
    --cc=cujomalainey@chromium.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=srini@kernel.org \
    --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