Re: [PATCH] ALSA: usb-audio: Fix NULL pointer deref in snd_usb_power_domain_set()

From: Takashi Iwai
Date: Thu Oct 10 2024 - 08:01:55 EST


On Thu, 10 Oct 2024 08:59:10 +0200,
Karol Kosik wrote:
>
> Commit adding support for multiple control interfaces expanded struct
> snd_usb_power_domain with pointer to control interface for proper control
> message routing but missed one initialization point of this structure,
> which has left new field with NULL value.
>
> Standard mandates that each device has at least one control interface and
> code responsible for power domain does not check for NULL values when
> querying for control interface. This caused some USB devices to crash
> the kernel.
>
> Fixes: 6aa8700150f7 ("ALSA: usb-audio: Support multiple control interfaces")
>
> Signed-off-by: Karol Kosik <k.kosik@xxxxxxxxxxx>

It seems that tabs got broken by your mailer, so I applied manually
now. Please fix your mailer setup at the next time you submit.


thanks,

Takashi