Re: [PATCH] sound: ua101: fix division by zero at probe
From: Takashi Iwai
Date: Mon Apr 27 2026 - 08:30:02 EST
On Sun, 26 Apr 2026 13:12:39 +0200,
SeungJu Cheon wrote:
>
> Add a missing sanity check for bNrChannels in detect_usb_format()
> to prevent a division by zero in playback_urb_complete() and
> capture_urb_complete().
>
> USB core does not validate class-specific descriptor fields such
> as bNrChannels, so drivers must verify them before use. If a
> device provides bNrChannels = 0, frame_bytes becomes zero and is
> later used as a divisor in the URB completion handlers, leading
> to a kernel crash.
>
> Fixes: 63978ab3e3e9 ("sound: add Edirol UA-101 support")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: SeungJu Cheon <suunj1331@xxxxxxxxx>
Thanks, applied now.
Takashi