Commit 1a8b7a67 authored by Vasiliy Kulikov's avatar Vasiliy Kulikov Committed by Patrick McHardy

ipv4: netfilter: arp_tables: fix information leak to userland

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: default avatarVasiliy Kulikov <segooon@gmail.com>
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
parent d817d29d
...@@ -927,6 +927,7 @@ static int get_info(struct net *net, void __user *user, ...@@ -927,6 +927,7 @@ static int get_info(struct net *net, void __user *user,
private = &tmp; private = &tmp;
} }
#endif #endif
memset(&info, 0, sizeof(info));
info.valid_hooks = t->valid_hooks; info.valid_hooks = t->valid_hooks;
memcpy(info.hook_entry, private->hook_entry, memcpy(info.hook_entry, private->hook_entry,
sizeof(info.hook_entry)); sizeof(info.hook_entry));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment