From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Oliver Neukum <oneukum@suse.com>
Cc: Griffin Kroah-Hartman <griffin@kroah.com>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: image: mdc800: change kmalloc() to kzalloc()
Date: Tue, 1 Sep 2026 16:30:23 +0200 [thread overview]
Message-ID: <2026090159-aspire-vanquish-da99@gregkh> (raw)
In-Reply-To: <0ff47679-3f00-4cb4-b1ee-2b3a0e15b13a@suse.com>
On Tue, Sep 01, 2026 at 02:17:54PM +0200, Oliver Neukum wrote:
>
>
> On 19.08.26 12:04, Griffin Kroah-Hartman wrote:
> > Change the kmalloc() calls in usb_mdc800_init() for irq_urb_buffer and
> > download_urb_buffer to kzalloc(), avoiding potential stack leaks if a
> > shorter message is received in mdc800_usb_irq() and
> > mdc800_usb_download_notify()
>
> Hi,
>
> thanks for the patch, but is this the right approach?
> If we get too short a reply we shouldn't process it
> at all.
The last time we tried to do that, we broke a bunch of CAN drivers
because they ended up sending "short" messages that no one noticed :(
With old hardware like this, let's just stick to this "obviously
correct" patch, and if someone with the hardware ever shows up, we can
then test short message information like this. As-is, this prevents a
simple "leak kernel memory to userspace with a hand-crafted-device" bug.
thanks,
greg k-h
next prev parent reply other threads:[~2026-09-01 14:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-19 10:04 Griffin Kroah-Hartman
2026-09-01 12:17 ` Oliver Neukum
2026-09-01 14:30 ` Greg Kroah-Hartman [this message]
2026-09-02 9:35 ` Oliver Neukum
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=2026090159-aspire-vanquish-da99@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=griffin@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=oneukum@suse.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®