From: Takashi Iwai <tiwai@suse.de>
To: Tristan Madani <tristmd@gmail.com>
Cc: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org,
Tristan Madani <tristan@talencesecurity.com>
Subject: Re: [PATCH v2 1/2] ALSA: usbusx2y: fix in04_last array size mismatch with in04_buf
Date: Sun, 06 Sep 2026 10:11:13 +0200 [thread overview]
Message-ID: <87ik4i4x5q.wl-tiwai@suse.de> (raw)
In-Reply-To: <20260904205826.4071119-1-tristmd@gmail.com>
On Fri, 04 Sep 2026 22:58:25 +0200,
Tristan Madani wrote:
>
> From: Tristan Madani <tristan@talencesecurity.com>
>
> The in04_last array in struct usx2ydev is declared as char[24], but
> in04_buf is allocated as sizeof(struct us428_ctls) which is 21 bytes.
> In i_usx2y_in04_int(), when ctl_snapshot_last == -2 (initialization
> path):
>
> memcpy(usx2y->in04_last, usx2y->in04_buf, sizeof(usx2y->in04_last));
>
> This copies 24 bytes from a 21-byte slab allocation, reading 3 bytes
> past the end of the source object.
>
> Introduce a USX2Y_IN04_SIZE constant defined as sizeof(struct
> us428_ctls) and use it consistently for the in04_last array, the
> in04_buf allocation, the URB transfer length, and the comparison loop,
> replacing the bare 24 and 21 literals throughout.
>
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Cc: stable@vger.kernel.org
> Signed-off-by: Tristan Madani <tristan@talencesecurity.com>
Applied both patches now. Thanks.
Takashi
prev parent reply other threads:[~2026-09-06 8:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-04 20:58 [PATCH v2 1/2] ALSA: usbusx2y: fix in04_last array size mismatch with in04_buf Tristan Madani
2026-09-04 20:58 ` [PATCH v2 2/2] ALSA: usbusx2y: validate URB actual_length in interrupt callback Tristan Madani
2026-09-06 8:11 ` 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=87ik4i4x5q.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=stable@vger.kernel.org \
--cc=tiwai@suse.com \
--cc=tristan@talencesecurity.com \
--cc=tristmd@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.