From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:57086 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936184AbdEWNms (ORCPT ); Tue, 23 May 2017 09:42:48 -0400 Subject: Patch "[media] digitv: limit messages to buffer size" has been added to the 4.9-stable tree To: amilburn@zall.org, gregkh@linuxfoundation.org, mchehab@s-opensource.com Cc: , From: Date: Tue, 23 May 2017 15:41:47 +0200 Message-ID: <1495546907181210@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled [media] digitv: limit messages to buffer size to the 4.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: digitv-limit-messages-to-buffer-size.patch and it can be found in the queue-4.9 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From 821117dc21083a99dd99174c10848d70ff43de29 Mon Sep 17 00:00:00 2001 From: Alyssa Milburn Date: Sat, 1 Apr 2017 14:33:42 -0300 Subject: [media] digitv: limit messages to buffer size From: Alyssa Milburn commit 821117dc21083a99dd99174c10848d70ff43de29 upstream. Return an error rather than memcpy()ing beyond the end of the buffer. Internal callers use appropriate sizes, but digitv_i2c_xfer may not. Signed-off-by: Alyssa Milburn Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman --- drivers/media/usb/dvb-usb/digitv.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/media/usb/dvb-usb/digitv.c +++ b/drivers/media/usb/dvb-usb/digitv.c @@ -33,6 +33,9 @@ static int digitv_ctrl_msg(struct dvb_us wo = (rbuf == NULL || rlen == 0); /* write-only */ + if (wlen > 4 || rlen > 4) + return -EIO; + memset(st->sndbuf, 0, 7); memset(st->rcvbuf, 0, 7); Patches currently in stable-queue which might be from amilburn@zall.org are queue-4.9/digitv-limit-messages-to-buffer-size.patch queue-4.9/ttusb2-limit-messages-to-buffer-size.patch queue-4.9/zr364xx-enforce-minimum-size-when-reading-header.patch queue-4.9/dw2102-limit-messages-to-buffer-size.patch