: Fix stack leakage in iptables/ip6_tables
Subsystems (2)
PATCH 18/18 : Fix stack leakage in iptables/ip6_tables
Fix stack leakage in iptables/ip6_tables.
# This is a BitKeeper generated diff -Nru style patch. #
# ChangeSet
# 2004/12/05 23:49:26+01:00 [email protected]
# [NETFILTER]: Fix stack leakage in iptables/ip6_tables
#
# Signed-off-by: Patrick McHardy <[email protected]>
#
# net/ipv6/netfilter/ip6_tables.c # 2004/12/05 23:49:24+01:00 [email protected] +1 -1 # [NETFILTER]: Fix stack leakage in iptables/ip6_tables # # Signed-off-by: Patrick McHardy <[email protected]> # # net/ipv4/netfilter/ip_tables.c # 2004/12/05 23:49:24+01:00 [email protected] +1 -1 # [NETFILTER]: Fix stack leakage in iptables/ip6_tables # # Signed-off-by: Patrick McHardy <[email protected]> # 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;
net/ipv6/netfilter/ip6_tables.c +1 -1
@@ -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 ;