lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <145201d6152f$584a7850$08df68f0$@samsung.com>
Date:   Sat, 18 Apr 2020 12:13:34 +0900
From:   "Sunyoung Kang" <sy0816.kang@...sung.com>
To:     "'Mauro Carvalho Chehab'" <mchehab+huawei@...nel.org>
Cc:     "'Hans Verkuil'" <hverkuil-cisco@...all.nl>,
        "'Arnd Bergmann'" <arnd@...db.de>,
        "'Greg Kroah-Hartman'" <gregkh@...uxfoundation.org>,
        "'Thomas Gleixner'" <tglx@...utronix.de>,
        <linux-media@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] media: v4l2-compat-ioctl32.c: copy reserved2 field in
 get_v4l2_buffer32

It uses the reserved 2 field to receive additional information about the
buffer from the user. 
Additional information is for special functions.

Copy the Reserved2 value to put_v4l2_buffer32(), but it is missing in
get_v4l2_buffer32(). Can't I put it in get_v4l2_buffer32() also?

Thanks,
Sunyoung

> -----Original Message-----
> From: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
> Sent: Friday, April 17, 2020 4:24 PM
> To: sy0816.kang@...sung.com
> Cc: Hans Verkuil <hverkuil-cisco@...all.nl>; Arnd Bergmann
<arnd@...db.de>;
> Greg Kroah-Hartman <gregkh@...uxfoundation.org>; Thomas Gleixner
> <tglx@...utronix.de>; linux-media@...r.kernel.org; linux-
> kernel@...r.kernel.org
> Subject: Re: [PATCH] media: v4l2-compat-ioctl32.c: copy reserved2 field in
> get_v4l2_buffer32
> 
> Em Fri, 17 Apr 2020 11:45:23 +0900
> sy0816.kang@...sung.com escreveu:
> 
> > From: Sunyoung Kang <sy0816.kang@...sung.com>
> >
> > get_v4l2_buffer32() didn't copy reserved2 field from userspace to
driver.
> > So the reserved2 value is not received through compat-ioctl32 in driver.
> > This patch copy reserved2 field of v4l2_buffer in get_v4l2_buffer32().
> 
> Why should it copy reserved values? Those should not be used anywhere.
> 
> >
> > Signed-off-by: Sunyoung Kang <sy0816.kang@...sung.com>
> > ---
> >  drivers/media/v4l2-core/v4l2-compat-ioctl32.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
> b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
> > index a99e82ec9ab6..e9b2b9c0ec9a 100644
> > --- a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
> > +++ b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
> > @@ -665,6 +665,7 @@ static int get_v4l2_buffer32(struct v4l2_buffer
> __user *p64,
> >  	if (V4L2_TYPE_IS_OUTPUT(type))
> >  		if (assign_in_user(&p64->bytesused, &p32->bytesused) ||
> >  		    assign_in_user(&p64->field, &p32->field) ||
> > +		    assign_in_user(&p64->reserved2, &p32->reserved2) ||
> >  		    assign_in_user(&p64->timestamp.tv_sec,
> >  				   &p32->timestamp.tv_sec) ||
> >  		    assign_in_user(&p64->timestamp.tv_usec,
> 
> 
> 
> Thanks,
> Mauro

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ