All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Ziheng Wei <zihengw03@163.com>
Cc: "Geoffrey D . Bennett" <g@b4.vu>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ALSA: FCP: avoid leaking uninitialized heap memory in fcp_ioctl_cmd()
Date: Tue, 01 Dec 2026 08:48:42 +0100	[thread overview]
Message-ID: <87ecc11lwl.wl-tiwai@suse.de> (raw)
In-Reply-To: <20261130103301.1383807-1-zihengw03@163.com>

On Mon, 30 Nov 2026 11:33:01 +0100,
Ziheng Wei wrote:
> 
> fcp_ioctl_cmd() allocates the request/response buffer with kmalloc(). If
> userspace invokes FCP_IOCTL_CMD with opcode == FCP_USB_REBOOT,
> req_size == 0, and resp_size > 0 (up to 4096 bytes), fcp_usb() returns 0
> early on -ESHUTDOWN or -EPROTO without writing resp_data, and
> fcp_ioctl_cmd() copies uninitialized heap memory back to userspace.
> 
> Allocate the buffer with kzalloc() and zero resp_data on the early-return
> path in fcp_usb().
> 
> Found by LLM-assisted static analysis and compile-tested on x86_64.
> 
> Fixes: 46757a3e7d50 ("ALSA: FCP: Add Focusrite Control Protocol driver")
> Signed-off-by: Ziheng Wei <zihengw03@163.com>

Applied now.  Thanks.


Takashi

      reply	other threads:[~2026-12-01  7:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30 10:33 [PATCH] ALSA: FCP: avoid leaking uninitialized heap memory in fcp_ioctl_cmd() Ziheng Wei
2026-12-01  7:48 ` 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=87ecc11lwl.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=g@b4.vu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    --cc=zihengw03@163.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.