Skip to content

Commit

Permalink
ipv4: netfilter: arp_tables: fix information leak to userland
Browse files Browse the repository at this point in the history
Structure arpt_getinfo is copied to userland with the field "name"
that has the last elements unitialized.  It leads to leaking of
contents of kernel stack memory.

Signed-off-by: Vasiliy Kulikov <[email protected]>
Signed-off-by: Patrick McHardy <[email protected]>
  • Loading branch information
segoon authored and kaber committed Nov 3, 2010
1 parent d817d29 commit 1a8b7a6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/ipv4/netfilter/arp_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -927,6 +927,7 @@ static int get_info(struct net *net, void __user *user,
private = &tmp;
}
#endif
memset(&info, 0, sizeof(info));
info.valid_hooks = t->valid_hooks;
memcpy(info.hook_entry, private->hook_entry,
sizeof(info.hook_entry));
Expand Down

0 comments on commit 1a8b7a6

Please sign in to comment.