mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: 徐晗翔 <xuhx@hust.edu.cn>
Cc: perex@perex.cz, tiwai@suse.com, linux-sound@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Re: ALSA: pcm: link-group walk in timer callback can use a closed substream's freed runtime (UAF)
Date: Wed, 25 Nov 2026 14:27:48 +0100	[thread overview]
Message-ID: <8733sp82i3.wl-tiwai@suse.de> (raw)
In-Reply-To: <49f1dede.596.1a212c69040.Coremail.xuhx@hust.edu.cn>

On Wed, 25 Nov 2026 13:55:32 +0100,
徐晗翔 wrote:
> 
> snd_pcm_group_for_each_entry() is a plain list_for_each_entry() over
> substream->group->substreams.  A driver timer callback (asihpi's
> snd_card_asihpi_timer_function()) walked that list from softirq with
> no group reference and no link rwsem, while the close of another
> linked substream could unlink the members, reassign the survivors
> and kfree() the group object -- the callback kept dereferencing a
> stale s/runtime pointer and freed group memory (KASAN UAF).
> 
> Core: free the group object only after an RCU grace period (new
> rcu_head in struct snd_pcm_group, kfree_rcu() at both free sites),
> so a group pointer read without the link rwsem stays memory-safe
> while a concurrent unlink tears the group down.
> 
> Driver: walk the group one member at a time under the group lock
> with rcu_read_lock() held -- the lock makes membership (and each
> member's runtime) stable while the member is processed, and RCU
> keeps the group object alive.  snd_pcm_stop_xrun()/
> snd_pcm_period_elapsed() are deferred out of the locked section:
> they enter snd_pcm_action(), which re-takes the group lock.  A
> substream object outlives its fd's close and both helpers recheck
> substream->runtime under the stream lock, so the deferred calls are
> safe against a concurrent close of the member.

I don't think we want to add a RCU there.  It can open a can of worms.

IMO, an easier and safer fix would be to keep the ASIHPI's timer
callback alive only during the PCM stream running, i.e. assure to kill
the timer callback at PCM stop and sync_stop.  During the PCM running
state, PCM links can't be changed, hence the list is safe to traverse.


thanks,

Takashi

> ---
>  sound/core/pcm_native.c   | 12 ++++++++++--
>  include/sound/pcm.h       |  6 ++++++
>  sound/pci/asihpi/asihpi.c | 144 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------
>  3 files changed, 145 insertions(+), 17 deletions(-)
> 
> diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
> --- a/sound/core/pcm_native.c
> +++ b/sound/core/pcm_native.c
> @@ -1368,7 +1368,11 @@
>  	do_free = refcount_dec_and_test(&group->refs);
>  	snd_pcm_group_unlock(group, substream->pcm->nonatomic);
>  	if (do_free)
> -		kfree(group);
> +		/* free only after an RCU grace period: a driver timer
> +		 * callback (softirq context) may hold group->lock under
> +		 * rcu_read_lock() without the link rwsem and must not
> +		 * touch freed group memory */
> +		kfree_rcu(group, rcu_head);
>  }
>  
>  /*
> @@ -2401,7 +2405,11 @@
>  
>  	snd_pcm_group_unlock_irq(group, nonatomic);
>  	if (do_free)
> -		kfree(group);
> +		/* free only after an RCU grace period: a driver timer
> +		 * callback (softirq context) may hold group->lock under
> +		 * rcu_read_lock() without the link rwsem and must not
> +		 * touch freed group memory */
> +		kfree_rcu(group, rcu_head);
>  	return 0;
>  }
>  
> diff --git a/include/sound/pcm.h b/include/sound/pcm.h
> --- a/include/sound/pcm.h
> +++ b/include/sound/pcm.h
> @@ -16,6 +16,7 @@
>  #include <linux/bitops.h>
>  #include <linux/pm_qos.h>
>  #include <linux/refcount.h>
> +#include <linux/rcupdate.h>
>  #include <linux/uio.h>
>  
>  #define snd_pcm_substream_chip(substream) ((substream)->private_data)
> @@ -455,6 +456,11 @@
>  	struct mutex mutex;
>  	struct list_head substreams;
>  	refcount_t refs;
> +	/* a group object is freed only after an RCU grace period, so a
> +	 * lockless/atomic group walker (e.g. a driver timer callback that
> +	 * takes group->lock under rcu_read_lock()) cannot touch freed
> +	 * group memory while a concurrent unlink tears the group down */
> +	struct rcu_head rcu_head;
>  };
>  
>  struct pid;
> diff --git a/sound/pci/asihpi/asihpi.c b/sound/pci/asihpi/asihpi.c
> --- a/sound/pci/asihpi/asihpi.c
> +++ b/sound/pci/asihpi/asihpi.c
> @@ -136,6 +136,8 @@
>  	unsigned int pcm_buf_dma_ofs;	/* DMA R/W offset in buffer */
>  	unsigned int pcm_buf_elapsed_dma_ofs;	/* DMA R/W offset in buffer */
>  	unsigned int drained_count;
> +	bool timer_walked;		/* one-shot mark for the timer
> +					 * callback's group walk */
>  	struct snd_pcm_substream *substream;
>  	u32 h_stream;
>  	struct hpi_format format;
> @@ -705,6 +707,31 @@
>  	return result;
>  }
>  
> +/* Pick the next group member this timer callback has not processed yet.
> + * Must be called with the group lock held and under rcu_read_lock(): the
> + * group list cannot change under us, so every member's runtime is still
> + * alive. */
> +static struct snd_pcm_substream *
> +asihpi_timer_next_member(struct snd_pcm_substream *substream,
> +			 struct snd_card_asihpi *card)
> +{
> +	struct snd_pcm_substream *s;
> +
> +	snd_pcm_group_for_each_entry(s, substream) {
> +		struct snd_card_asihpi_pcm *ds = s->runtime->private_data;
> +
> +		if (snd_pcm_substream_chip(s) != card)
> +			continue;
> +		/* don't link Cap and Play */
> +		if (substream->stream != s->stream)
> +			continue;
> +		if (ds->timer_walked)
> +			continue;
> +		return s;
> +	}
> +	return NULL;
> +}
> +
>  /** Timer function, equivalent to interrupt service routine for cards
>  */
>  static void snd_card_asihpi_timer_function(struct timer_list *t)
> @@ -713,10 +740,12 @@
>  	struct snd_pcm_substream *substream = dpcm->substream;
>  	struct snd_card_asihpi *card = snd_pcm_substream_chip(substream);
>  	struct snd_pcm_runtime *runtime;
> +	struct snd_pcm_group *group;
>  	struct snd_pcm_substream *s;
>  	unsigned int newdata = 0;
>  	unsigned int pcm_buf_dma_ofs, min_buf_pos = 0;
>  	unsigned int remdata, xfercount, next_jiffies;
> +	unsigned long flags;
>  	int first = 1;
>  	u16 state;
>  	u32 buffer_size, bytes_avail, samples_played, on_card_bytes;
> @@ -725,17 +754,58 @@
>  
>  	snd_pcm_debug_name(substream, name, sizeof(name));
>  
> -	/* find minimum newdata and buffer pos in group */
> +	/*
> +	 * Walk the PCM link group one member at a time, under the group
> +	 * lock and an RCU read lock.  This callback runs from a timer
> +	 * (softirq) with no group reference and no link rwsem, so a close
> +	 * of another linked substream could previously unlink the members,
> +	 * free the group object and free that member's runtime while this
> +	 * walk was holding a stale s/runtime pointer.
> +	 *
> +	 * The group lock keeps the membership (and each member's runtime)
> +	 * stable while the member is processed; the RCU read lock keeps
> +	 * the group object itself alive (snd_pcm_unlink() frees it only
> +	 * after a grace period).  snd_pcm_stop_xrun() and
> +	 * snd_pcm_period_elapsed() must run WITHOUT the group lock -- they
> +	 * enter snd_pcm_action(), which re-takes the group lock -- so they
> +	 * are deferred to after the unlocked section.  A substream object
> +	 * outlives the close of its fd, and both helpers recheck
> +	 * substream->runtime under the stream lock.
> +	 */
> +
> +	/* clear the one-shot walk marks of the previous invocation */
> +	rcu_read_lock();
> +	group = READ_ONCE(substream->group);	/* kept alive by RCU */
> +	spin_lock_irqsave(&group->lock, flags);
>  	snd_pcm_group_for_each_entry(s, substream) {
> -		struct snd_card_asihpi_pcm *ds = s->runtime->private_data;
> -		runtime = s->runtime;
> +		if (snd_pcm_substream_chip(s) == card) {
> +			struct snd_card_asihpi_pcm *ds =
> +				s->runtime->private_data;
>  
> -		if (snd_pcm_substream_chip(s) != card)
> -			continue;
> +			ds->timer_walked = false;
> +		}
> +	}
> +	spin_unlock_irqrestore(&group->lock, flags);
> +	rcu_read_unlock();
>  
> -		/* don't link Cap and Play */
> -		if (substream->stream != s->stream)
> -			continue;
> +	/* find minimum newdata and buffer pos in group */
> +	for (;;) {
> +		struct snd_card_asihpi_pcm *ds;
> +		struct snd_pcm_substream *xrun = NULL;
> +
> +		rcu_read_lock();
> +		group = READ_ONCE(substream->group);	/* kept alive by RCU */
> +		spin_lock_irqsave(&group->lock, flags);
> +
> +		s = asihpi_timer_next_member(substream, card);
> +		if (!s) {
> +			spin_unlock_irqrestore(&group->lock, flags);
> +			rcu_read_unlock();
> +			break;
> +		}
> +		ds = s->runtime->private_data;
> +		runtime = s->runtime;
> +		ds->timer_walked = true;
>  
>  		hpi_handle_error(hpi_stream_get_info_ex(
>  					ds->h_stream, &state,
> @@ -762,8 +832,9 @@
>  					"P%d drained\n", s->number);
>  				ds->drained_count++;
>  				if (ds->drained_count > 20) {
> -					snd_pcm_stop_xrun(s);
> -					continue;
> +					/* defer to after the unlock */
> +					xrun = s;
> +					goto member_done;
>  				}
>  			} else {
>  				ds->drained_count = 0;
> @@ -799,6 +870,13 @@
>  			(unsigned long)frames_to_bytes(runtime,
>  						runtime->control->appl_ptr)
>  		);
> +
> +member_done:
> +		spin_unlock_irqrestore(&group->lock, flags);
> +		rcu_read_unlock();
> +
> +		if (xrun)
> +			snd_pcm_stop_xrun(xrun);
>  	}
>  	pcm_buf_dma_ofs = min_buf_pos;
>  
> @@ -818,12 +896,41 @@
>  	asihpi_dbg("timer2, jif=%d, buf_pos=%d, newdata=%d, xfer=%d\n",
>  			next_jiffies, pcm_buf_dma_ofs, newdata, xfercount);
>  
> +	/* clear the one-shot walk marks again for the second pass */
> +	rcu_read_lock();
> +	group = READ_ONCE(substream->group);	/* kept alive by RCU */
> +	spin_lock_irqsave(&group->lock, flags);
>  	snd_pcm_group_for_each_entry(s, substream) {
> -		struct snd_card_asihpi_pcm *ds = s->runtime->private_data;
> +		if (snd_pcm_substream_chip(s) == card) {
> +			struct snd_card_asihpi_pcm *ds =
> +				s->runtime->private_data;
>  
> -		/* don't link Cap and Play */
> -		if (substream->stream != s->stream)
> -			continue;
> +			ds->timer_walked = false;
> +		}
> +	}
> +	spin_unlock_irqrestore(&group->lock, flags);
> +	rcu_read_unlock();
> +
> +	/* second pass, again one member at a time under the group lock
> +	 * (see above); snd_pcm_period_elapsed() is deferred to after the
> +	 * unlock for the same reason as snd_pcm_stop_xrun() */
> +	for (;;) {
> +		struct snd_card_asihpi_pcm *ds;
> +		struct snd_pcm_substream *elapsed = NULL;
> +
> +		rcu_read_lock();
> +		group = READ_ONCE(substream->group);	/* kept alive by RCU */
> +		spin_lock_irqsave(&group->lock, flags);
> +
> +		s = asihpi_timer_next_member(substream, card);
> +		if (!s) {
> +			spin_unlock_irqrestore(&group->lock, flags);
> +			rcu_read_unlock();
> +			break;
> +		}
> +		ds = s->runtime->private_data;
> +		runtime = s->runtime;
> +		ds->timer_walked = true;
>  
>  		/* Store dma offset for use by pointer callback */
>  		ds->pcm_buf_dma_ofs = pcm_buf_dma_ofs;
> @@ -887,8 +994,15 @@
>  			/* ? host_rw_ofs always ahead of elapsed_dma_ofs by preload size? */
>  			ds->pcm_buf_host_rw_ofs += xfercount;
>  			ds->pcm_buf_elapsed_dma_ofs += xfercount;
> -			snd_pcm_period_elapsed(s);
> +			/* defer to after the unlock */
> +			elapsed = s;
>  		}
> +
> +		spin_unlock_irqrestore(&group->lock, flags);
> +		rcu_read_unlock();
> +
> +		if (elapsed)
> +			snd_pcm_period_elapsed(elapsed);
>  	}
>  
>  	if (!card->hpi->interrupt_mode && dpcm->respawn_timer)
> 
> 
> > -----原始邮件-----
> > 发件人: 徐晗翔 <xuhx@hust.edu.cn>
> > 发送时间:2026-11-13 20:15:08 (星期五)
> > 收件人: perex@perex.cz, tiwai@suse.com
> > 抄送: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
> > 主题: ALSA: pcm: link-group walk in timer callback can use a closed substream's freed runtime (UAF)
> > 
> > `snd_card_asihpi_timer_function()` walks the PCM link group with
> > `snd_pcm_group_for_each_entry()` and dereferences each member's
> > `s->runtime->private_data`.  That macro is a plain `list_for_each_entry()`;
> > the callback holds no group reference and no group lock.  Close of another
> > linked substream can unlink/free the group and detach/free that substream's
> > runtime and `dpcm`, leaving the timer callback with a stale `s`/runtime
> > pointer.  This is reachable from user space through
> > `SNDRV_PCM_IOCTL_LINK` plus close, on hardware whose driver supports PCM
> > linking (asihpi does).
> > 
> > The detailed description:
> > 
> > * Test environment / affected version
> > 
> >   Linux 7.3.0 source plus a QEMU/KASAN fake-PCM harness.  No ASI6205 hardware
> >   was available; the harness reproduces the core group traversal and close
> >   ordering, with the asihpi callback's exact
> >   `snd_pcm_group_for_each_entry()` pattern.
> > 
> > * Mechanism
> > 
> >   The group loops are at `sound/pci/asihpi/asihpi.c:729-735` and `821-827`.
> >   They read `s->runtime->private_data` (and in one path `dma_area`) and call
> >   `snd_pcm_period_elapsed(s)`.  The macro is
> >   `include/sound/pcm.h:694`:
> > 
> >     #define snd_pcm_group_for_each_entry(s, substream) \
> >         list_for_each_entry(s, &substream->group->substreams, link_list)
> > 
> >   `snd_pcm_stream_lock_irq()` (`sound/core/pcm_native.c:140-144`) locks
> >   `substream->self_group`, not the group that the timer callback walks.
> >   `snd_pcm_unlink()` (`pcm_native.c:2370-2402`) takes
> >   `snd_pcm_link_rwsem` and the group lock, removes the closing substream,
> >   relinks the remaining streams, and may `kfree(group)`.
> >   `snd_pcm_release_substream()` (`pcm_native.c:2785-2805`) calls
> >   `pcm_release_private()` -> `snd_pcm_unlink()` at 2779-2783 before
> >   `snd_pcm_detach_substream()` frees the runtime and `dpcm`.
> > 
> >   A timer callback that already loaded member `s` or `s->runtime` can run
> >   after B's unlink/detach.  It may then read freed `runtime`, freed
> >   `private_data`, or a freed group list node; `snd_pcm_period_elapsed(s)`
> >   additionally takes the stale substream.
> > 
> > * Why existing synchronization does not close the window
> > 
> >   `snd_pcm_stop()` does transiently take a group reference through
> >   `snd_pcm_action()` -> `snd_pcm_stream_group_ref()` (`pcm_native.c:1378-1427`)
> >   and group lock, but it drops the reference after the STOP action.  The
> >   asihpi timer callback is not part of that action and holds no group
> >   reference.  Taking `snd_pcm_stream_lock_irq(A)` in the callback would only
> >   lock A's `self_group`; it would not pin B or the group.  The group can be
> >   freed while the callback holds a raw member pointer.
> > 
> > * Trigger model
> > 
> >   Two capture substreams A and B, same PCM and runtime state; user does
> >   `SNDRV_PCM_IOCTL_LINK` then starts A.  While A's timer callback is walking
> >   the group, user closes B.  `SNDRV_PCM_IOCTL_LINK` is available to a local
> >   user with the PCM device open; no special privilege is needed beyond access
> >   to the PCM.  Consequence: UAF in timer context, crash or memory corruption.
> > 
> > 
> > * How to run the PoC
> > 
> >   The harness is self-contained and does not need ASI6205 hardware: it creates
> >   a fake ALSA card with two capture substreams.  The tested configuration was
> >   7.3.0 with KASAN and 4 vCPU; a uniprocessor run may not overlap.
> > 
> >   Build against the target kernel build tree:
> > 
> >     printf 'obj-m := sndpci_race.o\n' > Kbuild
> >     make -C <kernel-build-dir> M=$PWD modules
> >     gcc -static -O2 -I<kernel-source>/include/uapi -o pcmtest pcmtest.c
> > 
> >   Put `sndpci_race.ko` and `pcmtest` into the guest initramfs/rootfs, boot the
> >   target kernel (QEMU/KVM recommended), then run as root:
> > 
> >     insmod sndpci_race.ko mode=pcm
> >     ./pcmtest link 200
> >     dmesg | grep -E 'BUG: KASAN|race_pcm_timer|victim use'
> > 
> >   In the minimal guest the fake card enumerates as card 0 and `pcmtest` opens
> >   `/dev/snd/pcmC0D0c`.  If the test machine already has another sound card,
> >   adjust `DEV` in `pcmtest.c` or use the QEMU initramfs.  Expected result:
> >   32 KASAN reports with `slab-use-after-free in race_pcm_timer` and about 114
> >   `victim use` lines.  
> > 
> > 
> > * Suggested direction 
> > 
> >   This needs a core/lifetime fix, not just an asihpi timer fix.  Possible
> >   directions: make group traversal safe against concurrent unlink (group
> >   reference or RCU-protected/atomic-safe iterator that pins each member's
> >   runtime), or provide a driver API that snapshots/refcounts members before
> >   the callback walks them.  On the asihpi side, quiesce the timer/IRQ before
> >   allowing the linked substream to detach.  Adding only
> >   `snd_pcm_stream_lock_irq(A)` is not sufficient because it locks A's
> >   `self_group`, not the group being walked.
> > 
> > 
> > 
> > Please keep me in Cc; I am not subscribed to the lists.
> > 
> > 
> > Regards,
> > Hanxiang Xu
> > xuhx@hust.edu.cn

  reply	other threads:[~2026-11-25 13:27 UTC|newest]

Thread overview: 93+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-27 12:35 usb: devio: usbdev_release() has no barrier against an in-flight async_completed() callback (use-after-free window on struct usb_dev_state)gregkh@linuxfoundation.org 徐晗翔
2026-10-27 14:12 ` Greg KH
2026-11-03 11:21   ` mm/slub: has_pcs_used() reads remote per-CPU sheaf state from flush_all_cpus_locked() without synchronization (data race; KCSAN blind spot: slub.o is uninstrumented) 徐晗翔
2026-11-04  9:41     ` Qing Wang
2026-11-04 10:07       ` Qing Wang
2026-11-03 11:30   ` futex/hrtimer: hrtimer_sleeper::task is read unsynchronized in 16 places on v7.3 -- the accessor series that fixes this is not in 7.3; please make sure it reaches the affected trees (backport nudge + stock-kernel KCSAN evidence) 徐晗翔
2026-11-03 11:48   ` cgroup: fork vs cgroup.procs write race in favordynmods mode -- v7.3 is affected; please make sure bf6fbf46b5ff reaches the stable trees (repro incl. uninstrumented natural hit) 徐晗翔
2026-11-03 14:51     ` Sasha Levin
2026-11-03 11:57   ` net: rtnetlink: rtnl_link_unregister() vs in-flight RTM_GETLINK dump readers -- v7.3 lacks the synchronize_rcu() fix (Fixes: 6b57ff21a310 family); A/B reproduction on stock 7.3 徐晗翔
2026-11-03 15:49     ` Eric Dumazet
2026-11-04 15:03     ` Sasha Levin
2026-11-03 12:07   ` wifi: wilc1000: SDIO/SPI remove destroys the srcu_struct before wiphy_unregister() -- late cfg80211 callbacks write through dangling srcu state (unfixed upstream; controlled + natural Oops) 徐晗翔
2026-11-03 12:10   ` gpio: gpiolib: final put of the gpio_device happens inside the SRCU read critical section on the setup-failure path -- deterministic use-after-free read at guard release (unfixed upstream) 徐晗翔
2026-11-05  8:52     ` Linus Walleij
2026-11-04 12:54   ` soc: qcom: pmic_glink_altmode: fix use-after-free on unbind (no cancel_work_sync for port work and enable_work) 徐晗翔
2026-11-04 13:04     ` Greg KH
2026-11-04 12:57   ` usb: typec: anx7411: unregister partner/altmodes before stopping the IRQ work -- use-after-free, double unregister, orphan partner on remove 徐晗翔
2026-11-04 13:28     ` Greg KH
2026-11-04 12:58   ` usb: typec: ucsi: deadlock on cros_ec unbind -- connector lock held across cancel_delayed_work_sync vs the mode-selection work's unbounded trylock polling 徐晗翔
2026-11-04 13:00   ` usb: typec: stusb160x/rt1719/hd3ss3220: IRQ thread vs remove -- double unregister / use-after-free on the partner and port 徐晗翔
2026-11-04 13:01   ` usb: typec: ucsi: displayport: data race on dp->header/ vdo_data/vdo_size -- work reads them unlocked while writers hold con->lock (VDM mismatch) 徐晗翔
2026-11-04 13:02   ` usb: typec: class: three lifetime/locking gaps around the mux/switch handles and mode_selection (drvdata UAF after provider unbind; no concurrent protocol for set/put; unlocked state_update vs delete) 徐晗翔
2026-11-10 12:56   ` driver core: uevent: netns teardown frees uevent_sock while a tagged uevent is still being broadcast (UAF) 徐晗翔
2026-11-10 13:00   ` 徐晗翔
2026-11-10 18:48     ` Greg KH
2026-11-10 13:05   ` ACPI: CPPC: per-CPU cpc_desc is freed on processor unbind without clearing the published pointer, causing UAF in cpufreq accessors 徐晗翔
2026-11-10 13:07   ` ACPI: CPPC: shared PCC subspace data can be freed while another CPU probes, reads, or tears it down 徐晗翔
2026-11-10 14:47     ` Christian Loehle
2026-11-10 13:11   ` ACPI: ACPICA: Reset can delete an event semaphore while another thread is blocked in Wait 徐晗翔
2026-11-10 13:14   ` power: supply: bq25890: pump-express work can call power_supply_changed after the psy is unregistered 徐晗翔
2026-11-10 13:17   ` power: supply: core: get/set property callbacks can run after unregister and read freed driver data 徐晗翔
2026-11-10 13:18   ` power: supply: core: system-battery enumeration can return an unregistered battery 徐晗翔
2026-11-10 13:21   ` power: supply: core: changed work can run after unregister and use freed LED triggers 徐晗翔
2026-11-10 13:23   ` power: supply: bq24190: IRQ handler can call power_supply_changed after the psy is unregistered 徐晗翔
2026-11-10 13:34   ` 徐晗翔
2026-11-11  7:17   ` genirq: NMI dispatch reads struct irqaction with no quiescence -- use-after-free across free_nmi()'s kfree (x86 verification on the arch-independent core path) 徐晗翔
2026-11-11  7:26   ` genirq: NMI API lacks the request_mutex / dev_id matching / idempotency semantics that free_irq() has -- double free_nmi releases chip PM and module references twice (verified) 徐晗翔
2026-11-11  7:30   ` kernfs: kernfs_drain()'s fast-path decision reads the active count without acquire ordering -- on weakly-ordered architectures the forced ->release()/unmap can be skipped 徐晗翔
2026-11-11 13:41     ` Greg KH
2026-11-13 11:58   ` ALSA: ctxfi: free atimer only after the timer IRQ is quiesced 徐晗翔
2026-11-13 16:30     ` Takashi Iwai
2026-11-25 12:51       ` [PATCH] Re: " 徐晗翔
2026-11-13 12:03   ` ALSA: ctxfi: do not free a running system timer when timer_delete_sync_try() returns -1 (UAF) 徐晗翔
2026-11-25 12:51     ` [PATCH] " 徐晗翔
2026-11-13 12:04   ` ALSA: asihpi: free IRQ before snd_card_free()/HPI delete on HPI6205 removal (UAF) 徐晗翔
2026-11-25 12:50     ` [PATCH] " 徐晗翔
2026-11-13 12:06   ` ALSA: asihpi: quiesce PCM timer and IRQ before freeing dpcm on close (UAF) 徐晗翔
2026-11-25 12:50     ` [PATCH] " 徐晗翔
2026-11-13 12:15   ` ALSA: pcm: link-group walk in timer callback can use a closed substream's freed runtime (UAF) 徐晗翔
2026-11-25 12:55     ` [PATCH] " 徐晗翔
2026-11-25 13:27       ` Takashi Iwai [this message]
2026-11-13 12:28   ` ALSA: usb-audio: us144mkii: PCM close frees runtime while playback/feedback URB completion and capture work still use it (UAF) 徐晗翔
2026-11-25 12:48     ` [PATCH] " 徐晗翔
2026-11-13 12:29   ` ALSA: usb-audio: us144mkii: queued stop_pcm_work calls snd_pcm_stop() after PCM close and dereferences NULL runtime 徐晗翔
2026-11-25 12:49     ` [PATCH] " 徐晗翔
2026-11-13 12:33   ` sched/topology: old domain chains are queued for RCU freeing before the per-CPU pointers are updated, so a late reader can still dereference a freed sched_domain and sched_domain_shared (UAF) 徐晗翔
2026-11-13 12:47   ` xfs: use-after-free in stats_clear sysctl handler during module unload 徐晗翔
2026-11-13 12:48   ` xfs: data races on xfs_params and xfs_globals tunables 徐晗翔
2026-11-17 12:32   ` jbd2: fix unsynchronized read of j_average_commit_time in procfs stats (KCSAN data race) 徐晗翔
2026-11-17 12:33   ` jbd2: read j_stats.ts_tid under j_history_lock in fast commit path " 徐晗翔
2026-11-17 12:35   ` jbd2: fix unlocked read/write of j_last_sync_writer in jbd2_journal_stop " 徐晗翔
2026-11-17 12:38   ` btrfs: compression: data race on compr_pool.count between shrinker scan and folio alloc/free " 徐晗翔
2026-11-17 12:47   ` fs/ceph: debugfs mdsmap_show() can dereference a freed MDS map after a concurrent map update (UAF) 徐晗翔
2026-11-17 12:48   ` fs/ceph: ceph_statfs() can dereference a freed MDS map (double evaluation of mdsc->mdsmap) (UAF) 徐晗翔
2026-11-17 12:49   ` fs/ceph: ceph_get_tree() out_splat path walks mdsc->mdsmap without mdsc->mutex (UAF) 徐晗翔
2026-11-17 12:50   ` fs/ceph: __ceph_setxattr() reads mdsmap->m_max_xattr_size " 徐晗翔
2026-11-17 12:51   ` fs/ceph: MDS reconnect paths read mdsc->mdsmap " 徐晗翔
2026-11-17 12:52   ` fs/ceph: caps renew paths read mdsmap->m_session_timeout " 徐晗翔
2026-11-24 14:53     ` Krzysztof Kozlowski
2026-11-17 12:53   ` fs/ceph: MDS connections can deliver CEPH_MSG_MDS_MAP and re-enter ceph_mdsc_handle_mdsmap() (UAF) 徐晗翔
2026-11-22  7:37   ` mm/hugetlb: a min_size-only hugetlbfs subpool is kfree()d before its last pinned page is released, so free_huge_folio() takes a spinlock on freed memory (UAF) 徐晗翔
2026-11-22 15:58     ` David Hildenbrand (Arm)
2026-11-25 12:05     ` David Hildenbrand (Arm)
2026-11-22  7:39   ` io_uring/zcrx: copy statistics lose updates when one ifq is shared by multiple rings (Data race) 徐晗翔
2026-11-23 13:50     ` Pavel Begunkov
2026-11-24 17:17       ` Clément Léger
2026-11-22  7:43   ` sound: core: compress offload fd does not pin card or module, so card removal leaves a live fd pointing at freed snd_compr (KASAN UAF) 徐晗翔
2026-11-22  8:07     ` Takashi Iwai
2026-11-25 12:44       ` [PATCH] Re: " 徐晗翔
2026-11-22  7:48   ` sound: core: jack kcontrol is published before jack_kctl allocation, and the failure path frees it without removing it from card->controls (null-ptr-deref) 徐晗翔
2026-11-24  9:39     ` Sreeraj S Kurup
2026-11-25 12:43       ` 徐晗翔
2026-11-22  7:50   ` sound: core: rawmidi input close can re-queue event_work after cancel_work_sync() (UAF) 徐晗翔
2026-11-24 14:52     ` Krzysztof Kozlowski
2026-11-25 12:45       ` [PATCH] Re: " 徐晗翔
2026-11-22  7:52   ` sound: core: hwdep DSP_LOAD check-then-act is unlocked, allowing concurrent DSP_LOAD callbacks (UAF) 徐晗翔
2026-11-25 12:46     ` [PATCH] " 徐晗翔
2026-11-22  7:55   ` sound: core: get_available_index() calls snd_ctl_find_id() without controls_rwsem (UAF risk) 徐晗翔
2026-11-25 12:46     ` [PATCH] " 徐晗翔
2026-11-22  7:56   ` sound: core: OSS mixer notify callback is invoked without module pin or mutex, racing with rmmod 徐晗翔
2026-11-25 12:47     ` [PATCH] " 徐晗翔
2026-11-22  7:57   ` sound: timer: snd_utimer_fops lacks .owner, so an open user timer fd does not pin snd-timer 徐晗翔
2026-11-25 12:48     ` [PATCH] " 徐晗翔

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=8733sp82i3.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=tiwai@suse.com \
    --cc=xuhx@hust.edu.cn \
    /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®