From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Philipp Stanner <pstanner@redhat.com>
Cc: Ian Abbott <abbotti@mev.co.uk>,
H Hartley Sweeten <hsweeten@visionengravers.com>,
Ivan Orlov <ivan.orlov0322@gmail.com>,
Benjamin Tissoires <benjamin.tissoires@redhat.com>,
linux-kernel@vger.kernel.org, Dave Airlie <airlied@redhat.com>
Subject: Re: [PATCH] drivers/comedi: copy userspace array safely
Date: Fri, 3 Nov 2023 06:53:29 +0100 [thread overview]
Message-ID: <2023110348-drained-tameness-b943@gregkh> (raw)
In-Reply-To: <20231102190848.51376-2-pstanner@redhat.com>
On Thu, Nov 02, 2023 at 08:08:49PM +0100, Philipp Stanner wrote:
> comedi_fops.c utilizes memdup_user() to copy a userspace array. This
> does not check for an overflow.
Is there potential for an overflow today?
>
> Use the new wrapper memdup_array_user() to copy the array more safely.
How about saying something like:
"Use the new function memdup_array_user() in case things change
in the future which would prevent overflows if something were to
change in the size of the structures".
Or something to the affect of "all is good today, but make it easy to be
correct in the future as well".
thanks,
greg k-h
next prev parent reply other threads:[~2023-11-03 5:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-02 19:08 [PATCH] drivers/comedi: copy userspace array safely Philipp Stanner
2023-11-03 5:53 ` Greg Kroah-Hartman [this message]
2023-11-03 9:11 ` Philipp Stanner
2023-11-03 10:25 ` Ian Abbott
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=2023110348-drained-tameness-b943@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=abbotti@mev.co.uk \
--cc=airlied@redhat.com \
--cc=benjamin.tissoires@redhat.com \
--cc=hsweeten@visionengravers.com \
--cc=ivan.orlov0322@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pstanner@redhat.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