mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Youngjun Lee <yjjuny.lee@samsung.com>
Cc: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ALSA: usb-audio: Fix out-of-bounds read in snd_usb_get_audioformat_uac3()
Date: Mon, 23 Jun 2025 17:09:59 +0200	[thread overview]
Message-ID: <87bjqemr3s.wl-tiwai@suse.de> (raw)
In-Reply-To: <20250623-uac3-oob-fix-v1-1-527303eaf40a@samsung.com>

On Mon, 23 Jun 2025 13:05:25 +0200,
Youngjun Lee wrote:
> 
> In snd_usb_get_audioformat_uac3(), the length value returned from
> snd_usb_ctl_msg() is used directly for memory allocation without
> validation. This length is controlled by the USB device.
> 
> The allocated buffer is cast to a uac3_cluster_header_descriptor
> and its fields are accessed without verifying that the buffer
> is large enough. If the device returns a smaller than expected
> length, this leads to an out-of-bounds read.
> 
> Add a length check to ensure the buffer is large enough for
> uac3_cluster_header_descriptor.
> 
> Signed-off-by: Youngjun Lee <yjjuny.lee@samsung.com>

Applied now.  Thanks.


Takashi

      reply	other threads:[~2025-06-23 15:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20250623110528epcas1p3900a802d75f41ab81d30a527808bc094@epcas1p3.samsung.com>
2025-06-23 11:05 ` Youngjun Lee
2025-06-23 15:09   ` Takashi Iwai [this message]

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=87bjqemr3s.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    --cc=yjjuny.lee@samsung.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

all inboxes | Powered by JetHome®