Re: [PATCH] sound: ua101: fix division by zero at probe

Takashi Iwai <[email protected]>
Newsgroups dev.linux.lists.linux-kernel-mentees,org.kernel.vger.linux-kernel,org.kernel.vger.linux-sound,org.kernel.vger.stable
Message-ID <[email protected]>
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: [email protected]
> Signed-off-by: SeungJu Cheon <[email protected]>

Thanks, applied now.


Takashi
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.