From: sashiko-bot@kernel.org
To: "Yannick Müller" <mail@ynnk.dev>
Cc: linux-sound@vger.kernel.org
Subject: Re: [PATCH 1/2] ALSA: usb-audio: Limit the depth of the clock topology walk
Date: Tue, 24 Nov 2026 13:30:21 +0000 [thread overview]
Message-ID: <sashiko-outbox-231210@kernel.org> (raw)
In-Reply-To: <20261124132551.137134-2-mail@ynnk.dev>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] ALSA: usb-audio: missing Fixes: trailer for
__uac_clock_find_source() recursion limit
--
commit 0d53f82d7f2ae58ca83e6e58e10001a394d6a384
Author: Yannick Müller <mail@ynnk.dev>
> ALSA: usb-audio: Limit the depth of the clock topology walk
>
> __uac_clock_find_source() recurses through clock selectors and
> multipliers using entity IDs from the device's descriptors. The
> visited bitmap stops loops, but a device can still chain up to 255
> distinct clock entities. At about 96 bytes of stack per nested call
> (x86-64, gcc 14) that is roughly 24 KB on a 16 KB kernel stack, so
> a device with crafted descriptors can overflow it.
>
> Pass the nesting depth down and fail with -EINVAL beyond 16 levels.
>
> Signed-off-by: Yannick Müller <mail@ynnk.dev>
[Severity: Low]
This fixes a potential kernel stack overflow in __uac_clock_find_source().
Should this include a Fixes: tag for the commit that introduced the
recursive clock topology walk?
Fixes: 79f920fbff56 ("ALSA: usb-audio: parse clock topology of UAC2 devices")
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261124132551.137134-1-mail@ynnk.dev?part=1
next prev parent reply other threads:[~2026-11-24 13:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 13:25 [PATCH 0/2] ALSA: usb-audio: Limit recursion depth when walking audio units Yannick Müller
2026-11-24 13:25 ` [PATCH 1/2] ALSA: usb-audio: Limit the depth of the clock topology walk Yannick Müller
2026-11-24 13:30 ` sashiko-bot [this message]
2026-11-24 13:25 ` [PATCH 2/2] ALSA: usb-audio: Limit the unit nesting depth in the mixer parser Yannick Müller
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=sashiko-outbox-231210@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=mail@ynnk.dev \
--cc=sashiko-reviews@lists.linux.dev \
/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