This is a note to let you know that I've just added the patch titled

    staging: comedi: fix infoleak to userspace

to the 3.0-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:
     staging-comedi-fix-infoleak-to-userspace.patch
and it can be found in the queue-3.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 819cbb120eaec7e014e5abd029260db1ca8c5735 Mon Sep 17 00:00:00 2001
From: Vasiliy Kulikov <[email protected]>
Date: Sun, 26 Jun 2011 12:56:22 +0400
Subject: staging: comedi: fix infoleak to userspace

From: Vasiliy Kulikov <[email protected]>

commit 819cbb120eaec7e014e5abd029260db1ca8c5735 upstream.

driver_name and board_name are pointers to strings, not buffers of size
COMEDI_NAMELEN.  Copying COMEDI_NAMELEN bytes of a string containing
less than COMEDI_NAMELEN-1 bytes would leak some unrelated bytes.

Signed-off-by: Vasiliy Kulikov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/staging/comedi/comedi_fops.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -383,8 +383,8 @@ static int do_devinfo_ioctl(struct comed
        /* fill devinfo structure */
        devinfo.version_code = COMEDI_VERSION_CODE;
        devinfo.n_subdevs = dev->n_subdevices;
-       memcpy(devinfo.driver_name, dev->driver->driver_name, COMEDI_NAMELEN);
-       memcpy(devinfo.board_name, dev->board_name, COMEDI_NAMELEN);
+       strlcpy(devinfo.driver_name, dev->driver->driver_name, COMEDI_NAMELEN);
+       strlcpy(devinfo.board_name, dev->board_name, COMEDI_NAMELEN);
 
        if (read_subdev)
                devinfo.read_subdevice = read_subdev - dev->subdevices;


Patches currently in stable-queue which might be from [email protected] are

queue-3.0/staging-comedi-fix-infoleak-to-userspace.patch

_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to