[3.16.y-ckt stable] Patch "[media] ttusb-dec: buffer overflow in ioctl" has been added to staging queue

Luis Henriques luis.henriques at canonical.com
Mon Nov 24 15:04:34 UTC 2014


This is a note to let you know that I have just added a patch titled

    [media] ttusb-dec: buffer overflow in ioctl

to the linux-3.16.y-queue branch of the 3.16.y-ckt extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.16.y-queue

This patch is scheduled to be released in version 3.16.7-ckt2.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.16.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Luis

------

>From 36bb34da20d9e641310f5153239f65b34495b7ae Mon Sep 17 00:00:00 2001
From: Dan Carpenter <dan.carpenter at oracle.com>
Date: Fri, 5 Sep 2014 09:09:28 -0300
Subject: [media] ttusb-dec: buffer overflow in ioctl
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

commit f2e323ec96077642d397bb1c355def536d489d16 upstream.

We need to add a limit check here so we don't overflow the buffer.

Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab at osg.samsung.com>
Cc: Moritz Mühlenhoff <jmm at inutil.org>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
 drivers/media/usb/ttusb-dec/ttusbdecfe.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/media/usb/ttusb-dec/ttusbdecfe.c b/drivers/media/usb/ttusb-dec/ttusbdecfe.c
index 5c45c9d0712d..9c29552aedec 100644
--- a/drivers/media/usb/ttusb-dec/ttusbdecfe.c
+++ b/drivers/media/usb/ttusb-dec/ttusbdecfe.c
@@ -156,6 +156,9 @@ static int ttusbdecfe_dvbs_diseqc_send_master_cmd(struct dvb_frontend* fe, struc
 		   0x00, 0x00, 0x00, 0x00,
 		   0x00, 0x00 };

+	if (cmd->msg_len > sizeof(b) - 4)
+		return -EINVAL;
+
 	memcpy(&b[4], cmd->msg, cmd->msg_len);

 	state->config->send_command(fe, 0x72,
--
2.1.0





More information about the kernel-team mailing list