mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 00:10:09 +00:00
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: Vasiliy Kulikov <segooon@gmail.com> Signed-off-by: Patrick McHardy <kaber@trash.net>
This commit is contained in:
parent
d817d29d0b
commit
1a8b7a6722
1 changed files with 1 additions and 0 deletions
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue