* [PATCH v1] ALSA: vx222: fix null-ptr-deref
@ 2021-09-07 1:47 Tong Zhang
2021-09-07 5:16 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Tong Zhang @ 2021-09-07 1:47 UTC (permalink / raw)
To: Jaroslav Kysela, Takashi Iwai, Leon Romanovsky, Tong Zhang,
alsa-devel, linux-kernel
a recent refactor created a null pointer vx in snd_vx222_probe().
The vx pointer should have been populated in snd_vx222_create() as
suggested in earlier version, otherwise vx->core.ibl.size will throw an
error.
[ 1.298398] BUG: kernel NULL pointer dereference, address: 00000000000001d8
[ 1.316799] RIP: 0010:snd_vx222_probe+0x155/0x290 [snd_vx222]
Fixes: 3bde3359aa16 ("ALSA: vx222: Allocate resources with device-managed APIs")
Signed-off-by: Tong Zhang <ztong0001@gmail.com>
---
sound/pci/vx222/vx222.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/pci/vx222/vx222.c b/sound/pci/vx222/vx222.c
index f48cc20b9e8a..468a6a20dc1e 100644
--- a/sound/pci/vx222/vx222.c
+++ b/sound/pci/vx222/vx222.c
@@ -137,6 +137,7 @@ static int snd_vx222_create(struct snd_card *card, struct pci_dev *pci,
}
chip->irq = pci->irq;
card->sync_irq = chip->irq;
+ *rchip = vx;
return 0;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1] ALSA: vx222: fix null-ptr-deref
2021-09-07 1:47 [PATCH v1] ALSA: vx222: fix null-ptr-deref Tong Zhang
@ 2021-09-07 5:16 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2021-09-07 5:16 UTC (permalink / raw)
To: Tong Zhang
Cc: Jaroslav Kysela, Takashi Iwai, Leon Romanovsky, alsa-devel, linux-kernel
On Tue, 07 Sep 2021 03:47:45 +0200,
Tong Zhang wrote:
>
> a recent refactor created a null pointer vx in snd_vx222_probe().
> The vx pointer should have been populated in snd_vx222_create() as
> suggested in earlier version, otherwise vx->core.ibl.size will throw an
> error.
>
> [ 1.298398] BUG: kernel NULL pointer dereference, address: 00000000000001d8
> [ 1.316799] RIP: 0010:snd_vx222_probe+0x155/0x290 [snd_vx222]
>
> Fixes: 3bde3359aa16 ("ALSA: vx222: Allocate resources with device-managed APIs")
> Signed-off-by: Tong Zhang <ztong0001@gmail.com>
Thanks, applied.
Takashi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-09-09 7:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-07 1:47 [PATCH v1] ALSA: vx222: fix null-ptr-deref Tong Zhang
2021-09-07 5:16 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).