mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: 徐晗翔 <xuhx@hust.edu.cn>
To: perex@perex.cz, tiwai@suse.com
Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: ALSA: hda/intel: serialize IRQ (de)registration  against card teardown (UAF)
Date: Tue, 1 Dec 2026 21:16:28 +0800 (GMT+08:00)	[thread overview]
Message-ID: <659e49b7.500e.1a231bfe03b.Coremail.xuhx@hust.edu.cn> (raw)
In-Reply-To: <2026102727-data-sequel-ce41@gregkh>

When an HDA codec verb times out, azx_rirb_get_response() walks a
fallback ladder and, with MSI enabled, calls disable_msi_reset_irq()
(sound/hda/controllers/intel.c:2088-2103): free_irq(bus->irq, chip),
pci_free_irq_vectors(), then azx_acquire_irq() ->
pci_alloc_irq_vectors() + request_irq(chip->pci->irq, azx_interrupt,
IRQF_SHARED, chip->card->irq_descr, chip) (intel.c:792-817).  This
compound sequence runs with no lock at all, from contexts that never
take the PCI device lock - the jackpoll delayed work
(sound/hda/common/codec.c:640-654) and the DRM audio component
notification path (sound/hda/codecs/hdmi/intelhdmi.c:157-174; the
callback only filters PM_EVENT_SUSPEND) - and per-codec regmaps only
serialize verbs within one codec, so on multi-codec systems two
contexts can enter disable_msi_reset_irq() on the same chip
simultaneously (each codec waits on its own regmap; the RIRB response
slots are per-address).  Meanwhile the teardown path
azx_remove() -> snd_card_free() -> ... -> azx_dev_free() -> azx_free()
executes free_irq(bus->irq, chip) (intel.c:1396-1397) equally
unlocked, reads bus->irq without resetting it to -1 afterwards, and
proceeds to release the chip memory (struct azx is embedded in the
card private area, freed by kfree(card)) while
snd_hdac_i915_exit() - which finally unregisters the DRM audio
component that feeds the notify path - only runs at the very end of
azx_free() (intel.c:1405-1406), i.e. after free_irq.

The interleavings:

  - double free_irq: azx_free() reads a stale bus->irq and frees the
    same line the fallback path is also freeing (or the fallback
    self-converges from two codecs at once);

  - pci_free_irq_vectors() concurrent with pci_alloc_irq_vectors():
    half-configured MSI/INTX domain, chip->pci->irq inconsistent
    between the racing threads;

  - request-after-free (worst case): the fallback's request_irq()
    completes AFTER azx_free()'s free_irq and after kfree(card): the
    handler azx_interrupt is then registered on a shared INTX line
    with a dev_id pointing into freed memory - every interrupt from
    any line sharer dereferences freed chip/bus/reg_lock state
    (sound/hda/common/controller.c:1061-1110), and chip->card->irq_descr
    (the request_irq name string, init.c:346-347) is read from freed
    memory at registration time.

Each verb costs up to two 1000ms response timeouts before the
fallback is entered (snd_hdac_bus_get_response_rirb,
sound/hda/core/controller.c:322 "msecs_to_jiffies(1000)"; the response
path retries once in polling mode), so the in-flight window is about
two seconds wide - far wider than a concurrent unbind.  Note the verb
paths themselves have no shutdown gate (codec_exec_() and the bus
command path never check bus->shutdown), so a teardown cannot stop an
in-flight verb from entering the fallback.

Source-analysis based: verified environment boundary documented below.
The locking gap itself is plain from the code - free_irq /
pci_alloc_irq_vectors / request_irq are individually irq-subsystem
safe, but the compound "free -> free-vectors -> alloc-vectors ->
request" has no caller-level atomicity, and nothing serializes it
against object release.

The detailed description:

* Test environment / affected version (still present as of 7.4-rc5)

  Source-verified on Linux 7.3.0 and RE-CHECKED on Linux 7.4.0-rc5
  (#1, 2026-12-01) - both vanilla mainline trees, unmodified sources,
  KASAN enabled, QEMU/KVM x86_64 guest with -device intel-hda
  + hda-duplex, snd_hda_intel builtin.  Re-check result: the fallback
  ladder (azx_rirb_get_response), disable_msi_reset_irq(),
  azx_acquire_irq() and the azx_free() IRQ section are all unchanged
  in 7.4-rc5 (the rc5 diff to intel.c touches only probe-failure
  handling, quirks and a devm allocation helper); 7.4-rc5 adds a new
  snd_hdac_bus_reset_response_counter() call after response timeouts,
  which unblocks later verbs to the same codec but does not touch the
  IRQ (de)registration path.  The proposed patch applies cleanly to
  7.4-rc5 (patch --dry-run passes).  The audited files
  (sound/hda/controllers/intel.c, sound/hda/common/controller.c,
  sound/hda/core/controller.c, sound/hda/common/codec.c) are
  byte-identical between the tested tree and the report baseline;
  line numbers below are from 7.3.

* Mechanism

  - disable_msi_reset_irq() (intel.c:2088-2103) is only entered from
    azx_rirb_get_response() when chip->msi is set; it then clears
    chip->msi (L2097) and azx_acquire_irq() takes the INTX branch
    (L797-802).  If pci_alloc_irq_vectors(PCI_IRQ_INTX) itself fails,
    the function returns -EIO without any disconnect; only "INTX
    allocation succeeded but request_irq() failed" (-EBUSY: line
    exclusively claimed or IRQF_TRIGGER mismatch with an existing
    action; -ENOMEM) reaches snd_card_disconnect(chip->card) at
    L811 - which is the in-flight-disconnect trigger of the
    companion card-lifecycle report.

  - The IRQ bookkeeping state (bus->irq, chip->msi,
    card->sync_irq at intel.c L814-815/L2094-2095, init.c:540-541) is
    plain unlocked integer state shared by the fallback context, the
    PM resume path and the teardown.

  - azx_free() (intel.c:1348-1409): chip->running = 0 (L1363) does
    not stop the notify path (intel_pin_eld_notify() checks only the
    codec power state, intelhdmi.c:169-170); free_irq runs at
    L1396-1397 with no bus->irq = -1 bookkeeping and no
    synchronization; snd_hdac_i915_exit() (acomp unregister) runs at
    L1405-1406, after free_irq - so a hotplug notification arriving
    during azx_free() can still send verbs, time out and enter the
    fallback while the IRQ is already gone.

  - azx_dev_free() (intel.c:1422-1426) is the SNDRV_DEV_LOWLEVEL
    dev_free: in snd_card_free()'s release phase it runs after the
    codec devices were already freed by the same
    snd_device_free_all() pass, so the fallback can also race kfree()
    of the codec structures it is sending verbs to.

* Trigger model

  1. a real verb timeout (PCIe surprise removal / bus fault /
     firmware hang; hbus->no_response_fallback == 0 is the default),
     with chip->msi enabled (the norm on Intel controllers);

  2. plus either (a) a concurrent PCI unbind/hot-remove, or (b) a
     second codec timing out at the same time (jackpoll_ms module
     parameter arms the poll work; hotplug/modeset arms the DRM
     notify path; GFHDMI/LOONGSON/ZHAOXIN controllers default to
     polling mode and time out more readily, intel.c:1908-1935).

  Under (a)/(b) the outcomes are the interleavings listed above:
  double free_irq (irqaction UAF / "Trying to free already-free
  IRQ"), torn vector-domain state, or azx_interrupt() registered with
  a freed dev_id on a shared INTX line (interrupt storm / UAF on
  every line trigger).  Requires root/admin-level operations or a
  hardware fault to arm; consequence: kernel crash / DoS, with the
  freed-handler registration as a corruption primitive.

* Reproducer and results on 7.3 (still present as of 7.4-rc5)

  Dynamic verification attempted in the KASAN QEMU environment with
  jackpoll_ms armed (500ms, then the 50ms parameter floor) and PCI
  remove+rescan churn overlapping reconfig/PCM verb traffic: QEMU
  performs orderly PCI removal - the ->remove callback completes
  before any MMIO/CORB-RIRB resource disappears - so no verb ever
  times out and disable_msi_reset_irq() is never entered (both runs
  clean; one run wedged in the unrelated card-lifecycle hang of the
  companion mail).  This mail is therefore source-analysis based: the
  missing serialization is directly visible in the code quoted above,
  and the environment boundary (orderly removal vs surprise removal)
  is documented rather than papered over.  Logs retained.

* Fix (full patch below)

  1. add chip->irq_mutex and hold it across the whole compound
     sequence in disable_msi_reset_irq()/azx_acquire_irq() and around
     azx_free()'s free_irq();

  2. set hda->freed = 1 BEFORE the IRQ teardown in azx_free() (today
     it is only set at the very end) and refuse new
     azx_acquire_irq()/disable_msi_reset_irq() work when set -
     closing the request-after-free face, since a fallback waiting on
     the mutex bails out instead of registering a handler on freed
     memory;

  3. bookkeeping: azx_free() now sets bus->irq = -1 after
     free_irq() (previously the stale line number survived and made
     the double free possible).

  The patch is regenerated against 7.4-rc5 (patch --dry-run passes
  cleanly) and reviewed by inspection; it has not been runtime-
  validated (see the environment boundary above).  Happy to test any
  counter-proposal.

* Patch

disable_msi_reset_irq() (verb-timeout fallback) tears down and re-arms
the controller IRQ with no locking, from jackpoll work / DRM audio
component contexts, and azx_free() frees the same IRQ without any
synchronization and without clearing bus->irq.  Interleavings range
from double free_irq() and torn PCI vector-domain state to
request_irq() completing after the chip memory was freed, leaving a
shared-line handler with a dev_id into freed memory.

Serialize all IRQ (de)registration under chip->irq_mutex, set
hda->freed before the IRQ teardown and refuse fallback work once set,
and fix the bus->irq bookkeeping.

--- a/sound/hda/common/hda_controller.h
+++ b/sound/hda/common/hda_controller.h
@@ -119,6 +119,7 @@
 
 	/* locks */
 	struct mutex open_mutex; /* Prevents concurrent open/close operations */
+	struct mutex irq_mutex; /* serializes IRQ (de)registration vs teardown */
 
 	/* PCM */
 	struct list_head pcm_list; /* azx_pcm list */
--- a/sound/hda/controllers/intel.c
+++ b/sound/hda/controllers/intel.c
@@ -792,7 +792,12 @@
 static int azx_acquire_irq(struct azx *chip, int do_disconnect)
 {
 	struct hdac_bus *bus = azx_bus(chip);
+	struct hda_intel *hda = container_of(chip, struct hda_intel, chip);
 	int ret;
+
+	guard(mutex)(&chip->irq_mutex);
+	if (hda->freed)
+		return -EIO;
 
 	if (!chip->msi || pci_alloc_irq_vectors(chip->pci, 1, 1, PCI_IRQ_MSI) < 0) {
 		ret = pci_alloc_irq_vectors(chip->pci, 1, 1, PCI_IRQ_INTX);
@@ -1393,8 +1398,12 @@
 		azx_stop_chip(chip);
 	}
 
+	/* refuse in-flight verb-timeout fallbacks before the IRQ goes away */
+	hda->freed = 1;
+	guard(mutex)(&chip->irq_mutex);
 	if (bus->irq >= 0)
-		free_irq(bus->irq, (void*)chip);
+		free_irq(bus->irq, (void *)chip);
+	bus->irq = -1;
 
 	azx_free_stream_pages(chip);
 	azx_free_streams(chip);
@@ -1404,8 +1413,6 @@
 
 	if (chip->driver_caps & AZX_DCAPS_I915_COMPONENT)
 		snd_hdac_i915_exit(bus);
-
-	hda->freed = 1;
 }
 
 static int azx_dev_disconnect(struct snd_device *device)
@@ -1802,6 +1809,7 @@
 
 	chip = &hda->chip;
 	mutex_init(&chip->open_mutex);
+	mutex_init(&chip->irq_mutex);
 	chip->card = card;
 	chip->pci = pci;
 	chip->ops = &pci_hda_ops;
@@ -2088,7 +2096,12 @@
 static int disable_msi_reset_irq(struct azx *chip)
 {
 	struct hdac_bus *bus = azx_bus(chip);
+	struct hda_intel *hda = container_of(chip, struct hda_intel, chip);
 	int err;
+
+	guard(mutex)(&chip->irq_mutex);
+	if (hda->freed)
+		return -EIO;
 
 	free_irq(bus->irq, chip);
 	bus->irq = -1;

-- 
2.47.1

  Please keep me in Cc; I am not subscribed to the lists.

Regards,
Hanxiang Xu
xuhx@hust.edu.cn

  parent reply	other threads:[~2026-12-01 13:16 UTC|newest]

Thread overview: 154+ 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-25 14:33         ` Takashi Iwai
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-25 14:35       ` Takashi Iwai
2026-11-26  2:13         ` 徐晗翔
2026-11-26  7:54           ` Takashi Iwai
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-25 14:43       ` Takashi Iwai
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-25 14:46       ` Takashi Iwai
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
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-25 16:25       ` Takashi Iwai
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-26  5:52       ` Ackerley Tng
2026-11-26  6:39         ` 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-25 14:21         ` Takashi Iwai
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-25 14:37         ` Takashi Iwai
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-25 14:14       ` Takashi Iwai
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-25 14:18       ` Takashi Iwai
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-25 14:16       ` Takashi Iwai
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] " 徐晗翔
2026-11-25 14:17       ` Takashi Iwai
2026-11-26 12:49   ` SUNRPC: rpc_new_client() kfree()s a fully published client on the auth-creation failure path -- use-after-free via concurrent rpc_pipefs mount notifications and via open debugfs/pipefs files (UAF) 徐晗翔
2026-11-26 12:52   ` SUNRPC: cache_read() serialises readers with a per-open inode lock, but every open() gets a fresh inode: concurrent formatting of the shared upcall buffer and unsynchronised rq->len (Data Race KCSAN-confirmed) 徐晗翔
2026-11-26 12:55   ` SUNRPC: rpc_switch_client_transport() removes the client pipedir without pipefs_sb_lock, racing the RPC_PIPEFS_UMOUNT notification chain into a double removal (UAF) 徐晗翔
2026-12-01  3:22   ` [PATCH 0/2] ALSA: emux: fix use-after-free of soundfont zones/samples between snd_emux_note_on() and soundfont removal paths (UAF) 徐晗翔
2026-12-01  6:37     ` Takashi Iwai
2026-12-01 11:56     ` 徐晗翔
2026-12-01 12:15       ` Takashi Iwai
2026-12-01  3:23   ` [PATCH] ALSA: emux: drain open hwdep users before freeing the emux structures(UAF) 徐晗翔
2026-12-01 11:57     ` 徐晗翔
2026-12-01 12:58       ` Takashi Iwai
2026-12-01  3:25   ` [PATCH] ALSA: emux: expose the hwdep device only after ports are initialized (probe-window NULL deref via MISC_MODE ioctl) 徐晗翔
2026-12-01 11:56     ` 徐晗翔
2026-12-01  3:27   ` [PATCH] ALSA: core: protect card->devices against concurrent disconnect/free -- snd_device UAF with split sub-driver removal (UAF) 徐晗翔
2026-12-01 11:56     ` 徐晗翔
2026-12-01  4:28   ` ALSA: jack: snd_jack_kctl_new() frees a published snd_kcontrol when the jack private-part allocation fails (UAF/double-free) 徐晗翔
2026-12-01 12:00     ` 徐晗翔
2026-12-01  4:31   ` ALSA: hwdep: struct snd_hwdep is kfree()d while open files, an in-flight ioctl and delayed close() still use it (UAF) 徐晗翔
2026-12-01 12:00     ` 徐晗翔
2026-12-01  4:32   ` ALSA: rawmidi: struct snd_rawmidi and its substreams are kfree()d while open files, delayed close() and a queued highpri work item still use them (UAF) 徐晗翔
2026-12-01 12:01     ` 徐晗翔
2026-12-01  4:33   ` ALSA: pcm: struct snd_pcm and its substreams are kfree()d while open fds and in-flight ioctls " 徐晗翔
2026-12-01 12:01     ` 徐晗翔
2026-12-01  4:36   ` ALSA: emu8000: the self-rearming emu8k_pcm timer survives trigger-stop and fires on freed memory after close (UAF) 徐晗翔
2026-12-01 12:01     ` 徐晗翔
2026-12-01  4:39   ` ALSA: control: find_id()/find_numid() kerneldoc claims they take controls_rwlock internally; the FAST_LOOKUP implementation is a lockless, unreferenced xa_load and several in-tree callers use it unlocked (UAF) 徐晗翔
2026-12-01 12:01     ` 徐晗翔
2026-12-01  4:42   ` ALSA: aoa/i2sbus: unlocked codec_list / dev->pcm check-and-free in i2sbus_detach_codec() can double-free the pcm under concurrent codec detaches (Double free) 徐晗翔
2026-12-01 12:02     ` 徐晗翔
2026-12-01 12:12   ` ASoC: intel: atom: SST: synchronize the DSP threaded IRQ against the PCM close path (UAF) 徐晗翔
2026-12-01 12:15   ` 徐晗翔
2026-12-01 12:19   ` ASoC: intel: atom: SST: clear the compress drain callbacks on close and gate them on the stream status (UAF) 徐晗翔
2026-12-01 12:22   ` ASoC: intel: atom: SST: log the byte-stream message header before handing it to the dispatch queue (UAF) 徐晗翔
2026-12-01 12:25   ` ALSA: emu8000: pin the module while an emu8k PCM runtime exists (UAF) 徐晗翔
2026-12-01 13:13     ` Takashi Iwai
2026-12-01 12:28   ` ALSA: emu8000: sync the PCM emulation timer before freeing snd_emu8k_pcm and gate the callback re-arm on timer_running (UAF) 徐晗翔
2026-12-01 12:37   ` ALSA: opl3: patch_table lookup/clear/load run lock-free against the voice_lock readers (UAF) 徐晗翔
2026-12-01 12:39   ` ALSA: core: card->devices list is managed lock-free -- struct snd_device UAF and LIST_POISON2 crash between card disconnect and independent sub-driver removal (UAF) 徐晗翔
2026-12-01 12:43   ` ALSA: hwdep: single-device teardown kfrees snd_hwdep while user space still holds the node open (UAF) 徐晗翔
2026-12-01 12:45   ` ALSA: rawmidi: snd_rawmidi_free() tears down substreams and the private data while fds are still open and the virmidi output work is queued (UAF) 徐晗翔
2026-12-01 12:47   ` ALSA: pcm: snd_emu8000_remove() frees a pcm with open fds and an armed period timer (UAF) 徐晗翔
2026-12-01 12:48   ` ALSA: vx: vx_free_pipe() kfrees pipes with no lock common to the threaded IRQ pipe walker (UAF) 徐晗翔
2026-12-01 12:51   ` ALSA: sb: emu8k frees the pcm private data without syncing the self-rearming period timer (UAF) 徐晗翔
2026-12-01 13:12   ` ALSA: core: serialize card disconnect/free and quiesce codecs before device release (UAF) 徐晗翔
2026-12-01 13:14   ` ALSA: core: pin and serialize snd_card_register() against disconnect/free (UAF) 徐晗翔
2026-12-01 13:16   ` 徐晗翔 [this message]
2026-12-01 13:18   ` ALSA: hda/hdmi: hold pcm_lock for the unlocked hdmi_present_sense() callers (Data race) 徐晗翔

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=659e49b7.500e.1a231bfe03b.Coremail.xuhx@hust.edu.cn \
    --to=xuhx@hust.edu.cn \
    --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

all inboxes | Powered by JetHome®