ipv4: netfilter: ip_tables: fix information leak to userland
Subsystems (4)
PATCH 1/1 ipv4: netfilter: ip_tables: fix information leak to userland
Structure ipt_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]>
---
Compile tested.
net/ipv4/netfilter/ip_tables.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
net/ipv4/netfilter/ip_tables.c +1 -0
@@ -1124,6 +1124,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));
Signature · 1 line
1.7.0.4
Quoted 3 lines · Vasiliy Kulikov
Structure
ipt_getinfois copied to userland with the field "name" that has the last elements unitialized. It leads to leaking of contents of kernel stack memory.
Also applied, thanks.