[PATCH] raw_sendmsg DoS (CAN-2005-2492)
authorAl Viro <aviro@redhat.com>
Wed, 31 Aug 2005 09:55:12 +0000 (10:55 +0100)
committerChris Wright <chrisw@osdl.org>
Sat, 10 Sep 2005 02:42:53 +0000 (19:42 -0700)
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-2005-2492.

Fix from Al Viro, ack from Dave Miller.

Signed-off-by: Chris Wright <chrisw@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/ipv4/raw.c
net/ipv6/raw.c

index d1835b1bc8c469d8394e0ae1a0bb8c9b9a6f975c..1364115e16b225d76764134821942565488ce5aa 100644 (file)
@@ -358,7 +358,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;
index 1d4d75b34d321c19ec892013c9f3b73bdfa3d9fe..1c72d49f77960108a6c0dc553d57025263b1993d 100644 (file)
@@ -619,7 +619,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;