From: Hans Verkuil <hverkuil@xs4all.nl>
To: Kevin Grandemange <grandemange.kevin@gmail.com>,
linux-media@vger.kernel.org
Subject: Re: [PATCH] [media] media/core: copy user v4l2_buffer.length in DMABUF case
Date: Wed, 17 Feb 2016 12:21:30 +0100 [thread overview]
Message-ID: <56C457BA.6000202@xs4all.nl> (raw)
In-Reply-To: <1455706043-7160-1-git-send-email-grandemange.kevin@gmail.com>
Has already been fixed.
But thanks anyway :-)
Regards,
Hans
On 02/17/16 11:47, Kevin Grandemange wrote:
> in __qbuf_dmabuf, we check the dmabuf size against the plane size.
>
> In the monoplanar case, this length was not copied from the userspace
> and we were getting a random value.
>
> Signed-off-by: Kevin Grandemange <grandemange.kevin@gmail.com>
> ---
> drivers/media/v4l2-core/v4l2-compat-ioctl32.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
> index 8fd84a6..af0e01c 100644
> --- a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
> +++ b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
> @@ -482,7 +482,8 @@ static int get_v4l2_buffer32(struct v4l2_buffer *kp, struct v4l2_buffer32 __user
> return -EFAULT;
> break;
> case V4L2_MEMORY_DMABUF:
> - if (get_user(kp->m.fd, &up->m.fd))
> + if (get_user(kp->length, &up->length) ||
> + get_user(kp->m.fd, &up->m.fd))
> return -EFAULT;
> break;
> }
>
prev parent reply other threads:[~2016-02-17 11:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-17 10:47 [PATCH] [media] media/core: copy user v4l2_buffer.length in DMABUF case Kevin Grandemange
2016-02-17 11:21 ` Hans Verkuil [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=56C457BA.6000202@xs4all.nl \
--to=hverkuil@xs4all.nl \
--cc=grandemange.kevin@gmail.com \
--cc=linux-media@vger.kernel.org \
/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.