* [PATCH 2.4 18/18]: Fix stack leakage in iptables/ip6_tables
@ 2004-12-20 7:15 Patrick McHardy
0 siblings, 0 replies; only message in thread
From: Patrick McHardy @ 2004-12-20 7:15 UTC (permalink / raw)
To: David S. Miller; +Cc: netfilter-devel
[-- Attachment #1: Type: text/plain, Size: 43 bytes --]
Fix stack leakage in iptables/ip6_tables.
[-- Attachment #2: 18.diff --]
[-- Type: text/x-patch, Size: 1625 bytes --]
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/12/05 23:49:26+01:00 kaber@coreworks.de
# [NETFILTER]: Fix stack leakage in iptables/ip6_tables
#
# Signed-off-by: Patrick McHardy <kaber@trash.net>
#
# net/ipv6/netfilter/ip6_tables.c
# 2004/12/05 23:49:24+01:00 kaber@coreworks.de +1 -1
# [NETFILTER]: Fix stack leakage in iptables/ip6_tables
#
# Signed-off-by: Patrick McHardy <kaber@trash.net>
#
# net/ipv4/netfilter/ip_tables.c
# 2004/12/05 23:49:24+01:00 kaber@coreworks.de +1 -1
# [NETFILTER]: Fix stack leakage in iptables/ip6_tables
#
# Signed-off-by: Patrick McHardy <kaber@trash.net>
#
diff -Nru a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c
--- a/net/ipv4/netfilter/ip_tables.c 2004-12-20 07:02:08 +01:00
+++ b/net/ipv4/netfilter/ip_tables.c 2004-12-20 07:02:08 +01:00
@@ -1274,7 +1274,7 @@
sizeof(info.underflow));
info.num_entries = t->private->number;
info.size = t->private->size;
- strcpy(info.name, name);
+ memcpy(info.name, name, sizeof(info.name));
if (copy_to_user(user, &info, *len) != 0)
ret = -EFAULT;
diff -Nru a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c
--- a/net/ipv6/netfilter/ip6_tables.c 2004-12-20 07:02:08 +01:00
+++ b/net/ipv6/netfilter/ip6_tables.c 2004-12-20 07:02:08 +01:00
@@ -1343,7 +1343,7 @@
sizeof(info.underflow));
info.num_entries = t->private->number;
info.size = t->private->size;
- strcpy(info.name, name);
+ memcpy(info.name, name, sizeof(info.name));
if (copy_to_user(user, &info, *len) != 0)
ret = -EFAULT;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-12-20 7:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-20 7:15 [PATCH 2.4 18/18]: Fix stack leakage in iptables/ip6_tables 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.