From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
To: Junrui Luo <moonafterrain@outlook.com>
Cc: Takashi Iwai <tiwai@suse.de>,
linux-sound@vger.kernel.org, Yuhao Jiang <danisjiang@gmail.com>
Subject: Re: [PATCH] ALSA: dice: fix buffer overflow in detect_stream_formats()
Date: Sat, 29 Nov 2025 05:39:20 +0900 [thread overview]
Message-ID: <20251128203920.GA106426@workstation.local> (raw)
In-Reply-To: <SYBPR01MB7881B043FC68B4C0DA40B73DAFDCA@SYBPR01MB7881.ausprd01.prod.outlook.com>
Hi,
On Fri, Nov 28, 2025 at 12:06:31PM +0800, Junrui Luo wrote:
> The function detect_stream_formats() reads the stream_count value directly
> from a FireWire device without validating it. This can lead to
> out-of-bounds writes when a malicious device provides a stream_count value
> greater than MAX_STREAMS.
>
> Fix by applying the same validation to both TX and RX stream counts in
> detect_stream_formats().
>
> Reported-by: Yuhao Jiang <danisjiang@gmail.com>
> Reported-by: Junrui Luo <moonafterrain@outlook.com>
> Fixes: 58579c056c1c ("ALSA: dice: use extended protocol to detect available stream formats")
> Cc: stable@vger.kernel.org
> Signed-off-by: Junrui Luo <moonafterrain@outlook.com>
> ---
> sound/firewire/dice/dice-extension.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Looks good to me.
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Regards
Takashi Sakamoto
next prev parent reply other threads:[~2025-11-28 20:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-28 4:06 [PATCH] ALSA: dice: fix buffer overflow in detect_stream_formats() Junrui Luo
2025-11-28 20:39 ` Takashi Sakamoto [this message]
2025-11-29 9:34 ` Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251128203920.GA106426@workstation.local \
--to=o-takashi@sakamocchi.jp \
--cc=danisjiang@gmail.com \
--cc=linux-sound@vger.kernel.org \
--cc=moonafterrain@outlook.com \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox