mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] missing copy_to_user check in tun driver.
@ 2003-08-11 15:59 davej
  0 siblings, 0 replies; only message in thread
From: davej @ 2003-08-11 15:59 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel, jgarzik

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;
 	}
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-08-11 16:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-11 15:59 [PATCH] missing copy_to_user check in tun driver davej

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®