Linux Sound subsystem development
 help / color / mirror / Atom feed
From: "Yannick Müller" <mail@ynnk.dev>
To: tiwai@suse.com, perex@perex.cz
Cc: linux-sound@vger.kernel.org, "Yannick Müller" <mail@ynnk.dev>
Subject: [PATCH 0/2] ALSA: usb-audio: Limit recursion depth when walking audio units
Date: Tue, 24 Nov 2026 14:25:49 +0100	[thread overview]
Message-ID: <20261124132551.137134-1-mail@ynnk.dev> (raw)

Fix a bug that makes it possible to overflow the kernel stack by
specifying a long chain of unique nested audio units. The current
implementation lets an external device specify up to 255 audio units,
which results in a stack overflow, as walking through all of them
recursively leads to too many nested calls.

Limit the recursion depth to 16 nested units so that a device can no
longer exhaust the kernel stack with a long chain.

Yannick Müller (2):
  ALSA: usb-audio: Limit the depth of the clock topology walk
  ALSA: usb-audio: Limit the unit nesting depth in the mixer parser

 sound/usb/clock.c | 20 +++++++++++++++-----
 sound/usb/mixer.c | 25 ++++++++++++++++++++++++-
 2 files changed, 39 insertions(+), 6 deletions(-)


base-commit: 8d7fe9885c62fc9a95bf55d9db244d9672a8aadc
-- 
2.47.3


             reply	other threads:[~2026-11-24 13:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24 13:25 Yannick Müller [this message]
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
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=20261124132551.137134-1-mail@ynnk.dev \
    --to=mail@ynnk.dev \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    /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