Re: [PATCH v5] usb: gadget: uvc: add validate and fix function for uvc response

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 09, 2022 at 03:10:55PM +0100, Greg KH wrote:
On Wed, Nov 09, 2022 at 03:04:12PM +0100, Michael Grzeschik wrote:
On Wed, Nov 09, 2022 at 11:23:10AM +0100, Greg KH wrote:
> On Wed, Oct 26, 2022 at 12:26:57AM +0200, Michael Grzeschik wrote:
> > When the userspace gets the setup requests for UVC_GET_CUR UVC_GET_MIN,
> > UVC_GET_MAX, UVC_GET_DEF it will fill out the ctrl response. This data
> > needs to be validated. Since the kernel also knows the limits for valid
> > cases, it can fixup the values in case the userspace is setting invalid
> > data.
> >
> > Signed-off-by: Michael Grzeschik <m.grzeschik@xxxxxxxxxxxxxx>
> >
> > ---
> > v1: -> v4:
> > - new patch
> > v4: -> v5:
> > - changed uvcg_info to uvcg_dbg for fixups, updated info strings
>
> What commit id does this fix?  Validating userspace data is a good
> thing, so shouldn't this also go to stable kernels?

This patch makes use of the uvc_get_frame_size function, which was
introduced with in v6.0.

"e219a712bc06 ("usb: gadget: uvc: add v4l2 try_format api call")

So this should not go in as a stable patch.

So why wouldn't 6.0 and 6.1 need this?

It would apply, but since it is a feature I would not tag it as a fix.

However you can add:

Fixes: e219a712bc06 ("usb: gadget: uvc: add v4l2 try_format api call")

Thanks,
Michael

--
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux