diff options
author | Takashi Iwai <tiwai@suse.de> | 2023-08-16 19:02:49 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2023-08-17 10:24:15 +0300 |
commit | b53a41ee9c7281d961a29a3524bcaacfc9020dd5 (patch) | |
tree | 20ca5722761cbb42ebd95e9e5d19c4486078a76e /include/sound | |
parent | ea29a02fd802d8df8202819f0a50d4ebb960bb2a (diff) | |
download | linux-b53a41ee9c7281d961a29a3524bcaacfc9020dd5.tar.xz |
ALSA: compress: Don't embed device
Embedding the struct device to snd_compr object may result in UAF when
the delayed kobj release is used. Like other devices, let's detach
the struct device from the snd_compr by allocating dynamically via
snd_device_alloc().
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-7-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/compress_driver.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sound/compress_driver.h b/include/sound/compress_driver.h index d91289c6f00e..bcf872c17dd3 100644 --- a/include/sound/compress_driver.h +++ b/include/sound/compress_driver.h @@ -148,7 +148,7 @@ struct snd_compr_ops { */ struct snd_compr { const char *name; - struct device dev; + struct device *dev; struct snd_compr_ops *ops; void *private_data; struct snd_card *card; |