From: Mark J Cox Date: Tue, 20 Sep 2005 00:55:30 +0000 (-0700) Subject: [PATCH] raw_sendmsg DoS on 2.6 X-Git-Tag: v2.6.14-rc2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6d1cfe3f1752f17e297df60c8bcc6cd6e0a58449;p=profile%2Fivi%2Fkernel-x86-ivi.git [PATCH] raw_sendmsg DoS on 2.6 Fix unchecked __get_user that could be tricked into generating a memory read on an arbitrary address. The result of the read is not returned directly but you may be able to divine some information about it, or use the read to cause a crash on some architectures by reading hardware state. CAN-2004-2492. Fix from Al Viro, ack from Dave Miller. Signed-off-by: Linus Torvalds --- diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index 304bb0a..4b0d7e4 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c @@ -361,7 +361,7 @@ static void raw_probe_proto_opt(struct flowi *fl, struct msghdr *msg) if (type && code) { get_user(fl->fl_icmp_type, type); - __get_user(fl->fl_icmp_code, code); + get_user(fl->fl_icmp_code, code); probed = 1; } break; diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index 5aa3691..a1265a3 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c @@ -627,7 +627,7 @@ static void rawv6_probe_proto_opt(struct flowi *fl, struct msghdr *msg) if (type && code) { get_user(fl->fl_icmp_type, type); - __get_user(fl->fl_icmp_code, code); + get_user(fl->fl_icmp_code, code); probed = 1; } break;