* [PATCH] ipv4: netfilter: ip_tables: fix information leak to userland
@ 2010-10-30 14:26 ` Vasiliy Kulikov
0 siblings, 0 replies; 4+ messages in thread
From: Vasiliy Kulikov @ 2010-10-30 14:26 UTC (permalink / raw)
To: kernel-janitors
Cc: Patrick McHardy, David S. Miller, Alexey Kuznetsov,
Pekka Savola (ipv6),
James Morris, Hideaki YOSHIFUJI, netfilter-devel, netfilter,
coreteam, netdev, linux-kernel
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 <segooon@gmail.com>
---
Compile tested.
net/ipv4/netfilter/ip_tables.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c
index d31b007..a846d63 100644
--- a/net/ipv4/netfilter/ip_tables.c
+++ b/net/ipv4/netfilter/ip_tables.c
@@ -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));
--
1.7.0.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] ipv4: netfilter: ip_tables: fix information leak to userland
@ 2010-10-30 14:26 ` Vasiliy Kulikov
0 siblings, 0 replies; 4+ messages in thread
From: Vasiliy Kulikov @ 2010-10-30 14:26 UTC (permalink / raw)
To: kernel-janitors
Cc: Patrick McHardy, David S. Miller, Alexey Kuznetsov,
Pekka Savola (ipv6),
James Morris, Hideaki YOSHIFUJI, netfilter-devel, netfilter,
coreteam, netdev, linux-kernel
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 <segooon@gmail.com>
---
Compile tested.
net/ipv4/netfilter/ip_tables.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c
index d31b007..a846d63 100644
--- a/net/ipv4/netfilter/ip_tables.c
+++ b/net/ipv4/netfilter/ip_tables.c
@@ -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));
--
1.7.0.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ipv4: netfilter: ip_tables: fix information leak to userland
2010-10-30 14:26 ` Vasiliy Kulikov
@ 2010-11-03 7:45 ` Patrick McHardy
-1 siblings, 0 replies; 4+ messages in thread
From: Patrick McHardy @ 2010-11-03 7:45 UTC (permalink / raw)
To: Vasiliy Kulikov
Cc: kernel-janitors, David S. Miller, Alexey Kuznetsov,
Pekka Savola (ipv6),
James Morris, Hideaki YOSHIFUJI, netfilter-devel, netfilter,
coreteam, netdev, linux-kernel
On 30.10.2010 16:26, Vasiliy Kulikov wrote:
> 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.
Also applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ipv4: netfilter: ip_tables: fix information leak to userland
@ 2010-11-03 7:45 ` Patrick McHardy
0 siblings, 0 replies; 4+ messages in thread
From: Patrick McHardy @ 2010-11-03 7:45 UTC (permalink / raw)
To: Vasiliy Kulikov
Cc: kernel-janitors, David S. Miller, Alexey Kuznetsov,
Pekka Savola (ipv6),
James Morris, Hideaki YOSHIFUJI, netfilter-devel, netfilter,
coreteam, netdev, linux-kernel
On 30.10.2010 16:26, Vasiliy Kulikov wrote:
> 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.
Also applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-11-03 7:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-30 14:26 [PATCH] ipv4: netfilter: ip_tables: fix information leak to userland Vasiliy Kulikov
2010-10-30 14:26 ` Vasiliy Kulikov
2010-11-03 7:45 ` Patrick McHardy
2010-11-03 7:45 ` Patrick McHardy
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.