All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: "Benoît Sevens" <bsevens@google.com>
Cc: stable@vger.kernel.org, Dan Carpenter <dan.carpenter@linaro.org>,
	stable@kernel.org, Takashi Iwai <tiwai@suse.de>
Subject: Re: [PATCH 5.15.y] ALSA: usb-audio: Fix a DMA to stack memory bug
Date: Tue, 17 Dec 2024 13:57:05 +0100	[thread overview]
Message-ID: <2024121738-pulverize-subatomic-262e@gregkh> (raw)
In-Reply-To: <20241217124318.734250-1-bsevens@google.com>

On Tue, Dec 17, 2024 at 12:43:18PM +0000, Benoît Sevens wrote:
> From: Dan Carpenter <dan.carpenter@linaro.org>
> 
> The usb_get_descriptor() function does DMA so we're not allowed
> to use a stack buffer for that.  Doing DMA to the stack is not portable
> all architectures.  Move the "new_device_descriptor" from being stored
> on the stack and allocate it with kmalloc() instead.
> 
> Fixes: b909df18ce2a ("ALSA: usb-audio: Fix potential out-of-bound accesses for Extigy and Mbox devices")
> Cc: stable@kernel.org
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> Link: https://patch.msgid.link/60e3aa09-039d-46d2-934c-6f123026c2eb@stanley.mountain
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> (cherry picked from commit f7d306b47a24367302bd4fe846854e07752ffcd9)
> [Benoît: there is no mbox3 suppport and no __free macro in 5.15]
> Signed-off-by: Benoît Sevens <bsevens@google.com>
> ---
>  sound/usb/quirks.c | 31 +++++++++++++++++++++----------
>  1 file changed, 21 insertions(+), 10 deletions(-)

I see 2 versions of this, which one is correct?

When sending new versions, always properly version them.  I'll delete
this and wait for a proper v2.

thanks,

greg k-h

  reply	other threads:[~2024-12-17 12:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-10  9:08 FAILED: patch "[PATCH] ALSA: usb-audio: Fix a DMA to stack memory bug" failed to apply to 5.15-stable tree gregkh
2024-12-17 12:39 ` [PATCH 5.15.y] ALSA: usb-audio: Fix a DMA to stack memory bug Benoît Sevens
2024-12-17 12:46   ` Benoît Sevens
2024-12-17 15:36   ` Sasha Levin
2024-12-17 12:43 ` Benoît Sevens
2024-12-17 12:57   ` Greg KH [this message]
2024-12-17 15:36   ` Sasha Levin
2024-12-17 13:13 ` [PATCH 5.15.y v2] " Benoît Sevens
2024-12-17 15:36   ` Sasha Levin

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=2024121738-pulverize-subatomic-262e@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=bsevens@google.com \
    --cc=dan.carpenter@linaro.org \
    --cc=stable@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tiwai@suse.de \
    /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.