Skip to content

Commit

Permalink
[PATCH] raw_sendmsg DoS on 2.6
Browse files Browse the repository at this point in the history
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 <torvalds@osdl.org>
  • Loading branch information
Mark J Cox authored and Linus Torvalds committed Sep 20, 2005
1 parent 997a51a commit 6d1cfe3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion net/ipv4/raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion net/ipv6/raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6d1cfe3

Please sign in to comment.