netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] ax25 check error on memcpy_fromiovec
@ 2003-12-09  4:23 Chris Wright
  2003-12-09  4:24 ` [PATCH 2/4] irda " Chris Wright
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Chris Wright @ 2003-12-09  4:23 UTC (permalink / raw)
  To: netdev; +Cc: davem, shemminger

Check the return value on memcpy_fromiovec().

===== net/ax25/af_ax25.c 1.33 vs edited =====
--- 1.33/net/ax25/af_ax25.c	Tue Oct  7 06:27:14 2003
+++ edited/net/ax25/af_ax25.c	Fri Dec  5 16:43:44 2003
@@ -1534,7 +1534,12 @@
 	SOCK_DEBUG(sk, "AX.25: Appending user data\n");
 
 	/* User data follows immediately after the AX.25 data */
-	memcpy_fromiovec(skb_put(skb, len), msg->msg_iov, len);
+	if (memcpy_fromiovec(skb_put(skb, len), msg->msg_iov, len)) {
+		err = -EFAULT;
+		kfree_skb(skb);
+		goto out;
+	}
+
 	skb->nh.raw = skb->data;
 
 	/* Add the PID if one is not supplied by the user in the skb */

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2004-01-23  2:13 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-09  4:23 [PATCH 1/4] ax25 check error on memcpy_fromiovec Chris Wright
2003-12-09  4:24 ` [PATCH 2/4] irda " Chris Wright
2003-12-09  4:25   ` [PATCH 3/4] netrom " Chris Wright
2003-12-09  4:27     ` [PATCH 4/4] rose " Chris Wright
2003-12-09  5:39 ` [PATCH 1/4] ax25 " David S. Miller
2003-12-09  5:41   ` Chris Wright
2003-12-19 10:34 ` [PATCH 1/5] tun " maximilian attems
2003-12-19 14:23   ` Jeff Garzik
2004-01-17  0:45   ` Chris Wright
2004-01-21 20:49     ` Max Krasnyansky
2004-01-23  2:13       ` Chris Wright

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).