lkml.org 
[lkml]   [2003]   [Aug]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] missing copy_to_user check in tun driver.
Date
diff -urpN --exclude-from=/home/davej/.exclude bk-linus/drivers/net/tun.c linux-2.5/drivers/net/tun.c
--- bk-linus/drivers/net/tun.c 2003-06-17 00:23:21.000000000 +0100
+++ linux-2.5/drivers/net/tun.c 2003-06-25 12:26:54.000000000 +0100
@@ -459,7 +459,8 @@ static int tun_chr_ioctl(struct inode *i
if (err)
return err;

- copy_to_user((void *)arg, &ifr, sizeof(ifr));
+ if (copy_to_user((void *)arg, &ifr, sizeof(ifr)))
+ return -EFAULT;
return 0;
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:47    [W:0.033 / U:0.748 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site