[packages/nagios-plugins] Rel 2.
arekm
arekm at pld-linux.org
Thu Nov 12 00:09:13 CET 2026
commit 17c6d381e4266065b77243e2ea67512c3d03908a
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Wed Nov 11 23:56:01 2026 +0100
Rel 2.
Add upstream fix from PR 833.
nagios-plugins-check_icmp-targets-overflow.patch | 39 ++++++++++++++++++++++++
nagios-plugins.spec | 6 +++-
2 files changed, 44 insertions(+), 1 deletion(-)
---
diff --git a/nagios-plugins.spec b/nagios-plugins.spec
index 322ac9f..444e9bc 100644
--- a/nagios-plugins.spec
+++ b/nagios-plugins.spec
@@ -16,7 +16,7 @@ Summary: Host/service/network monitoring program plugins for Nagios
Summary(pl.UTF-8): Wtyczki do monitorowania hostów/usług/sieci dla Nagiosa
Name: nagios-plugins
Version: 2.5
-Release: 1
+Release: 2
License: GPL v3
Group: Networking
Source0: http://www.nagios-plugins.org/download/%{name}-%{version}.tar.gz
@@ -39,6 +39,8 @@ Patch10: %{name}-ping.patch
Patch11: dns-config.patch
Patch12: %{name}-check_http-nocache.patch
Patch13: %{name}-test_utils-format-security.patch
+# https://github.com/nagios-plugins/nagios-plugins/pull/833
+Patch14: %{name}-check_icmp-targets-overflow.patch
URL: http://www.nagiosplugins.org/
BuildRequires: autoconf
BuildRequires: automake
@@ -527,6 +529,7 @@ mv nagios-plugins-config-*/* .
%patch -P11 -p1
%patch -P12 -p1
%patch -P13 -p1
+%patch -P14 -p1
# remove libtool m4 macro copies, breaks when system libtool is older
%{__rm} gl/m4/libtool.m4 gl/m4/lt*.m4
@@ -721,6 +724,7 @@ done
%defattr(644,root,root,755)
#%attr(755,root,root) %{_libdir}/libnagiosplug.so.0.0.0
%attr(755,root,root) %{plugindir}/negate
+%attr(755,root,root) %{plugindir}/remove_perfdata
%attr(755,root,root) %{plugindir}/urlize
%{plugindir}/utils.pm
diff --git a/nagios-plugins-check_icmp-targets-overflow.patch b/nagios-plugins-check_icmp-targets-overflow.patch
new file mode 100644
index 0000000..b530710
--- /dev/null
+++ b/nagios-plugins-check_icmp-targets-overflow.patch
@@ -0,0 +1,39 @@
+From c94e36bd08d959faf89c9cfe80e082d5c59c3d9f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael at orlitzky.com>
+Date: Wed, 1 Jul 2026 16:31:41 -0400
+Subject: [PATCH] plugins-root/check_icmp.c: fix unsigned short overflow
+
+The number of targets (hosts) for check_icmp is tallied up, one at a
+time, in
+
+ static unsigned short targets = 0;
+
+When more than USHRT_MAX hosts are specified, check_icmp segfaults
+before dropping privileges. This may be exploitable, and is bad in any
+case. The same issue was recently fixed in monitoring-plugins:
+
+ https://www.openwall.com/lists/oss-security/2026/07/01/5
+
+The two codebases have diverged, but the issue is easy to reproduce in
+nagios-plugins as well. Afterwards, fixing it is a matter of refusing
+to add_target() when there are already USHRT_MAX targets.
+---
+ plugins-root/check_icmp.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/plugins-root/check_icmp.c b/plugins-root/check_icmp.c
+index f21228fa..34ea12a1 100644
+--- a/plugins-root/check_icmp.c
++++ b/plugins-root/check_icmp.c
+@@ -1705,6 +1705,11 @@ static int add_target_ip(char *arg, struct sockaddr_storage *in) {
+ struct sockaddr_in *sin = NULL, *host_sin;
+ struct sockaddr_in6 *sin6 = NULL, *host_sin6;
+
++ if (targets == USHRT_MAX) {
++ crash("add_target_ip(%s, ...): maximum number of targets (%hu) exceeded",
++ arg, USHRT_MAX);
++ }
++
+ if (address_family == AF_INET) {
+ sin = (struct sockaddr_in *)in;
+ } else {
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/nagios-plugins.git/commitdiff/17c6d381e4266065b77243e2ea67512c3d03908a
More information about the pld-cvs-commit
mailing list