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

    uml: check length in exitcode_proc_write()

to the 3.10-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:
     uml-check-length-in-exitcode_proc_write.patch
and it can be found in the queue-3.10 subdirectory.

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


>From 201f99f170df14ba52ea4c52847779042b7a623b Mon Sep 17 00:00:00 2001
From: Dan Carpenter <[email protected]>
Date: Tue, 29 Oct 2013 22:06:04 +0300
Subject: uml: check length in exitcode_proc_write()

From: Dan Carpenter <[email protected]>

commit 201f99f170df14ba52ea4c52847779042b7a623b upstream.

We don't cap the size of buffer from the user so we could write past the
end of the array here.  Only root can write to this file.

Reported-by: Nico Golde <[email protected]>
Reported-by: Fabian Yamaguchi <[email protected]>
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 arch/um/kernel/exitcode.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/arch/um/kernel/exitcode.c
+++ b/arch/um/kernel/exitcode.c
@@ -40,9 +40,11 @@ static ssize_t exitcode_proc_write(struc
                const char __user *buffer, size_t count, loff_t *pos)
 {
        char *end, buf[sizeof("nnnnn\0")];
+       size_t size;
        int tmp;
 
-       if (copy_from_user(buf, buffer, count))
+       size = min(count, sizeof(buf));
+       if (copy_from_user(buf, buffer, size))
                return -EFAULT;
 
        tmp = simple_strtol(buf, &end, 0);


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

queue-3.10/staging-wlags49_h2-buffer-overflow-setting-station-name.patch
queue-3.10/staging-ozwpan-prevent-overflow-in-oz_cdev_write.patch
queue-3.10/aacraid-missing-capable-check-in-compat-ioctl.patch
queue-3.10/staging-bcm-info-leak-in-ioctl.patch
queue-3.10/uml-check-length-in-exitcode_proc_write.patch
queue-3.10/staging-sb105x-info-leak-in-mp_get_count.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to