linux/include
Takashi Iwai bc41a7228c ALSA: pcm: Don't embed device
So far we use the embedded struct device for each PCM substreams in
struct snd_pcm.  This may result in UAF when the delayed kobj release
is used; each corresponding struct device is still accessed at the
(delayed) device release, while the snd_pcm object may be already
gone.

As a workaround, detach the struct device from the snd_pcm object by
allocating via the new snd_device_alloc() helper.

A caveat is that we store the PCM substream pointer to drvdata since
the device resume and others require the access to it.

This patch is based on the fix Curtis posted initially.  In this
patch, the changes are split and use the new helper function instead.

Link: https://lore.kernel.org/r/20230801171928.1460120-1-cujomalainey@chromium.org
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Tested-by: Curtis Malainey <cujomalainey@chromium.org>
Link: https://lore.kernel.org/r/20230816160252.23396-4-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-08-17 09:23:45 +02:00
..
acpi More ACPI updates for 6.5-rc1 2023-07-06 22:25:06 -07:00
asm-generic vmlinux.lds.h: Remove a reference to no longer used sections .text..refcount 2023-07-11 14:29:43 -07:00
clocksource
crypto This update includes the following changes: 2023-06-30 21:27:13 -07:00
drm Linux 6.5-rc1 2023-07-11 09:23:20 +02:00
dt-bindings Another set of clk driver updates and fixes for the merge window. The 2023-07-04 11:07:45 -07:00
keys
kunit
kvm KVM: arm64: vgic-v4: Make the doorbell request robust w.r.t preemption 2023-07-13 22:23:34 +00:00
linux Merge branch 'topic/intel-hda' into for-next 2023-08-04 13:05:42 +02:00
math-emu
media lib/math: Move dvb_math.c into lib/math/int_log.c 2023-07-09 22:47:48 +01:00
memory
misc
net bluetooth pull request for net: 2023-07-20 12:57:55 -07:00
pcmcia
ras
rdma rdma: fix INFINIBAND_USER_ACCESS dependency 2023-07-03 16:55:04 -07:00
rv
scsi SCSI misc on 20230629 2023-06-30 11:57:07 -07:00
soc net: dsa: felix: make vsc9959_tas_guard_bands_update() visible to ocelot->ops 2023-07-06 19:10:22 -07:00
sound ALSA: pcm: Don't embed device 2023-08-17 09:23:45 +02:00
target SCSI misc on 20230629 2023-06-30 11:57:07 -07:00
trace jbd2: remove journal_clean_one_cp_list() 2023-07-10 23:09:21 -04:00
uapi fuse update for 6.5 2023-07-19 11:00:27 -07:00
ufs Merge branch '6.5/scsi-staging' into 6.5/scsi-fixes 2023-07-11 12:15:15 -04:00
vdso
video sticon/parisc: Fix STI console on 64-bit only machines 2023-06-30 17:14:14 +02:00
xen