The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Pengpeng Hou <pengpeng@iscas.ac.cn>
Cc: Daniel Mack <zonque@gmail.com>, 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: caiaq: validate EP1 reply lengths
Date: Sun, 05 Jul 2026 12:14:49 +0200	[thread overview]
Message-ID: <87mrw568va.wl-tiwai@suse.de> (raw)
In-Reply-To: <20260705084601.56400-1-pengpeng@iscas.ac.cn>

On Sun, 05 Jul 2026 10:46:01 +0200,
Pengpeng Hou wrote:
> 
> usb_ep1_command_reply_dispatch() uses buf[0] as a command byte and then
> reads command-specific fixed items from the same URB buffer. Several
> paths use buf + 1, buf[1], buf[2], or buf + 3 without first proving that
> urb->actual_length contains those bytes.
> 
> Add per-command length checks, use a payload length derived from the
> bytes after the command byte for the control-state copy, and reject short
> analog input payloads before the input helper reads fixed offsets from
> the EP1 reply.
> 
> Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>

Applied now.  Thanks.


Takashi

      reply	other threads:[~2026-07-05 10:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-05  8:46 [PATCH] ALSA: usb-audio: caiaq: validate EP1 reply lengths Pengpeng Hou
2026-07-05 10:14 ` 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=87mrw568va.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=pengpeng@iscas.ac.cn \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    --cc=zonque@gmail.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