From 2f47f707f5bda2b1481c3f6981a944607b724d5e Mon Sep 17 00:00:00 2001 From: eabdullin Date: Fri, 31 May 2024 16:29:09 +0000 Subject: [PATCH] Import from AlmaLinux stable repository --- .arpwatch.metadata | 2 -- SOURCES/arpwatch-2.1a15-hostname-buffer.patch | 11 +++++++++++ ...arpwatch-2.1a15-unbounded-hostname-copy.patch | 15 +++++++++++++++ SPECS/arpwatch.spec | 16 +++++++++++++++- 4 files changed, 41 insertions(+), 3 deletions(-) delete mode 100644 .arpwatch.metadata create mode 100644 SOURCES/arpwatch-2.1a15-hostname-buffer.patch create mode 100644 SOURCES/arpwatch-2.1a15-unbounded-hostname-copy.patch diff --git a/.arpwatch.metadata b/.arpwatch.metadata deleted file mode 100644 index d677074..0000000 --- a/.arpwatch.metadata +++ /dev/null @@ -1,2 +0,0 @@ -9dffaec0f132e5bb7aedfc840c5c67068bfbce69 SOURCES/arpwatch-2.1a15.tar.gz -cc6e8ac77f799dd09cd5ff7bf7db235788a0d942 SOURCES/ethercodes-20110707.dat.bz2 diff --git a/SOURCES/arpwatch-2.1a15-hostname-buffer.patch b/SOURCES/arpwatch-2.1a15-hostname-buffer.patch new file mode 100644 index 0000000..33fe566 --- /dev/null +++ b/SOURCES/arpwatch-2.1a15-hostname-buffer.patch @@ -0,0 +1,11 @@ +--- a/db.c 2000-10-01 01:39:58.000000000 +0200 ++++ b/db.c 2024-01-03 10:29:20.367656089 +0100 +@@ -62,7 +62,7 @@ + /* Ethernet info */ + struct einfo { + u_char e[6]; /* ether address */ +- char h[34]; /* simple hostname */ ++ char h[64]; /* simple hostname */ + time_t t; /* timestamp */ + }; + diff --git a/SOURCES/arpwatch-2.1a15-unbounded-hostname-copy.patch b/SOURCES/arpwatch-2.1a15-unbounded-hostname-copy.patch new file mode 100644 index 0000000..ab4ef95 --- /dev/null +++ b/SOURCES/arpwatch-2.1a15-unbounded-hostname-copy.patch @@ -0,0 +1,15 @@ +--- a/db.c 2024-01-03 10:36:30.009600848 +0100 ++++ b/db.c 2024-02-21 11:35:04.420115207 +0100 +@@ -283,8 +283,10 @@ + BCOPY(e, ep->e, 6); + if (h == NULL && !initializing) + h = getsname(a); +- if (h != NULL && !isdigit((int)*h)) +- strcpy(ep->h, h); ++ if (h != NULL) { ++ strncpy(ep->h, h, sizeof(ep->h)); ++ ep->h[sizeof(ep->h) - 1] = '\0'; ++ } + ep->t = t; + return (ep); + } diff --git a/SPECS/arpwatch.spec b/SPECS/arpwatch.spec index 772fa02..27541c8 100644 --- a/SPECS/arpwatch.spec +++ b/SPECS/arpwatch.spec @@ -4,7 +4,7 @@ Name: arpwatch Epoch: 14 Version: 2.1a15 -Release: 44%{?dist} +Release: 46%{?dist} Summary: Network monitoring tools for tracking IP addresses on a network Group: Applications/System License: BSD with advertising @@ -41,6 +41,8 @@ Patch17: arpwatch-pie.patch Patch18: arpwatch-aarch64.patch Patch19: arpwatch-promisc.patch Patch20: arpwatch-ethernet-address-format.patch +Patch21: arpwatch-2.1a15-hostname-buffer.patch +Patch22: arpwatch-2.1a15-unbounded-hostname-copy.patch %description The arpwatch package contains arpwatch and arpsnmp. Arpwatch and @@ -74,6 +76,8 @@ network. %patch18 -p1 -b .aarch64 %patch19 -p1 -b .promisc %patch20 -p1 -b .ethernet-address +%patch21 -p1 -b .hostname-buffer +%patch22 -p1 -b .hostname-buffer-bound %build %configure @@ -150,6 +154,16 @@ fi %attr(0644,-,arpwatch) %verify(not md5 size mtime) %config(noreplace) %{_vararpwatch}/ethercodes.dat %changelog +* Wed Feb 21 2024 Pavel Simovec - 14:2.1a15-46 +- Give a bound to hostname buffer copy +- Resolves: RHEL-5636 + +* Thu Jan 25 2024 Pavel Simovec - 14:2.1a15-45 +- rebuilt + +* Wed Jan 03 2024 Pavel Simovec - 14:2.1a15-44 +- Increase hostname buffer + * Tue Dec 3 2019 Jan Synáček - 14:2.1a15-43 - MAC addresses are not shown properly (#1778313)