- fixed buffer overflow in arp (#164695)

This commit is contained in:
Radek Vokál 2005-08-03 09:31:24 +00:00
parent b4d0d93142
commit 988b98b494
2 changed files with 17 additions and 1 deletions

View File

@ -0,0 +1,11 @@
--- net-tools-1.60/arp.c.old 2005-08-03 08:23:46.000000000 +0200
+++ net-tools-1.60/arp.c 2005-08-03 11:02:10.000000000 +0200
@@ -235,7 +235,7 @@
struct ifreq ifr;
struct hwtype *xhw;
- strcpy(ifr.ifr_name, ifname);
+ strncpy(ifr.ifr_name, ifname, IFNAMSIZ);
if (ioctl(sockfd, SIOCGIFHWADDR, &ifr) < 0) {
fprintf(stderr, _("arp: cant get HW-Address for `%s': %s.\n"), ifname, strerror(errno));
return (-1);

View File

@ -3,7 +3,7 @@
Summary: Basic networking tools.
Name: net-tools
Version: 1.60
Release: 55
Release: 56
License: GPL
Group: System Environment/Base
Source0: http://www.tazenda.demon.co.uk/phil/net-tools/net-tools-%{version}.tar.bz2
@ -54,6 +54,7 @@ Patch39: net-tools-1.60-trim_iface.patch
Patch40: net-tools-1.60-stdo.patch
Patch41: net-tools-1.60-statistics.patch
Patch42: net-tools-1.60-ifconfig.patch
Patch43: net-tools-1.60-arp_overflow.patch
BuildRoot: %{_tmppath}/%{name}-root
Requires(post,preun): chkconfig
@ -104,6 +105,7 @@ ifconfig, netstat, route, and others.
%patch40 -p1 -b .stdo
%patch41 -p1 -b .statistics
%patch42 -p1 -b .iface_drop
%patch43 -p1 -b .overflow
cp %SOURCE2 ./config.h
cp %SOURCE3 ./config.make
@ -212,6 +214,9 @@ exit 0
%{_sysconfdir}/rc.d/init.d/netplugd
%changelog
* Wed Aug 03 2005 Radek Vokal <rvokal@redhat.com> 1.60-56
- fixed buffer overflow in arp (#164695)
* Wed Jul 20 2005 Radek Vokal <rvokal@redhat.com> 1.60-55
- ifconfig - fixed virtual interface dropping (#162888)