Your message dated Fri, 09 Dec 2016 18:05:23 +0000
with message-id <[email protected]>
and subject line Bug#743493: fixed in nsca 2.9.2-1
has caused the Debian Bug report #743493,
regarding send_nsca signal handling is undefined behaviour, causes SEGVs
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
743493: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=743493
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: nsca
Version: 2.9.1-2
Severity: important
Tags: upstream, patch
Control: found -1 2.7.2
Hi,
I tripped over this bug because send_nsca was SEGVing on a machine
where another high-priority process was chewing up nearly all the
CPU. Our cron scripts just complained about SEGV, but running it on
the console resulted in:
Error: Timeout after 10 seconds
Segmentation fault
On investigation, this is because send_nsca's alarm_handler function
(installed as the handler for SIGALRM) does all sorts of things that
are undefined in a signal handler, such as printf, memset, free.
I attach a simple patch that replaces the buggy signal handler with
one that emits an error message and then exits. I'm not convinced that
there's enough merit in the memory-"cleaning" that do_exit does to do
the harder work of trying to sort that out.
Regards,
Matthew
-- System Information:
Debian Release: 7.4
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 3.2.0-4-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages nsca depends on:
ii confget 1.03-1
ii debconf [debconf-2.0] 1.5.49
ii libc6 2.13-38+deb7u1
ii libmcrypt4 2.5.8-3.1
ii nsca-client 2.9.1-2
nsca recommends no packages.
Versions of packages nsca suggests:
pn nagios-plugins-basic | nagios-plugins <none>
pn nagios3 <none>
-- debconf information excluded
diff -ruN nsca-2.9.1/src/send_nsca.c nsca-2.9.1-mcv/src/send_nsca.c
--- nsca-2.9.1/src/send_nsca.c 2012-01-27 13:20:58.000000000 +0000
+++ nsca-2.9.1-mcv/src/send_nsca.c 2014-04-03 12:54:55.449140814 +0100
@@ -467,10 +467,11 @@
/* handle timeouts */
void alarm_handler(int sig){
+ static const char message[] = "Error: Timeout\n";
- printf("Error: Timeout after %d seconds\n",socket_timeout);
+ write(stderr,message,sizeof(message) - 1);
- do_exit(STATE_CRITICAL);
+ _exit(STATE_CRITICAL);
}
--- End Message ---
--- Begin Message ---
Source: nsca
Source-Version: 2.9.2-1
We believe that the bug you reported is fixed in the latest version of
nsca, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Bas Couwenberg <[email protected]> (supplier of updated nsca package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Fri, 09 Dec 2016 18:30:05 +0100
Source: nsca
Binary: nsca nsca-client
Architecture: source amd64
Version: 2.9.2-1
Distribution: unstable
Urgency: medium
Maintainer: Debian Nagios Maintainer Group
<[email protected]>
Changed-By: Bas Couwenberg <[email protected]>
Description:
nsca - Nagios service monitor agent
nsca-client - Nagios service monitor agent - client package
Closes: 663047 685455 689460 689631 737216 743493 775839 824332 846870
Changes:
nsca (2.9.2-1) unstable; urgency=medium
.
* Team upload.
.
[ Alexander Wirt ]
* Fix initscript to not return if /var/run/nagios got created.
(closes: #689631)
.
[ Bas Couwenberg ]
* New upstream release.
- Replaced all instances of signal() with sigaction() + blocking.
(closes: 743493)
- Race condition when opening command file
(closes: #663047)
* Add Vcs-* fields to control file.
* Restructure control file with cme.
* Add Homepage field to control file.
* Switch from dpatch to source format 3.0 (quilt).
* Update watch file to handle common issues.
* Separate lintian overrides with newlines.
* Update copyright file using copyright-format 1.0.
* Don't explicitly install lintian overrides.
* Add upstream metadata.
* Add gbp.conf to use pristine-tar by default.
* Use dh-autoreconf for retooling.
* Use dh_auto_configure instead of configure directly.
* Add patch to fix spelling errors.
* Enable all hardening buildflags.
* Fix manpage-has-errors-from-man issues.
* Don't use asterisk in NEWS entry.
* Bump debhelper compatibility to 9.
* Add patch to fix missing argument in open calls.
* Add lsb-base to nsca dependencies.
* Bump Standards-Version to 3.9.8, changes:
Vcs-* fields, copyright-format 1.0.
* Redirect update-rc.d output to /dev/null.
* Use Icinga instead of Nagios (nagios3 removed from Debian).
(closes: #846870)
* Change nagios-plugins dependencies to monitoring-plugins.
* Add Italian translation of debconf messages by Beatrice Torracca.
(closes: #737216)
* Add Brazilian Portuguese debconf templates translation
by Adriano Rafael Gomes.
(closes: #824332)
* Add patch by Xiwen Cheng to fix potential buffer overflow.
(closes: #685455)
* Add patch to change PID directory from /var/run to /var/run/nagios.
(closes: #689460)
* Apply patch by Tomas Forsman to return status_of_proc status.
(closes: #775839)
* Change Conflicts with version to Breaks/Replaces.
Checksums-Sha1:
61b43b37baaca1431d63927a767735fdd84b86da 1980 nsca_2.9.2-1.dsc
2e25dbe2e9394f8ece36694888da5b6fab6e094f 117299 nsca_2.9.2.orig.tar.gz
478c306233f70ea63e61d3685dc92caada54660f 19948 nsca_2.9.2-1.debian.tar.xz
7b4ec34e08af9549202b019461e10b5d83feac14 24452
nsca-client-dbgsym_2.9.2-1_amd64.deb
c965239d6f63000623ac6b41806a60b2548d2a42 18884 nsca-client_2.9.2-1_amd64.deb
de58d5136f4827baf7b1fc11f680b86b998211aa 37946 nsca-dbgsym_2.9.2-1_amd64.deb
0021b57ad8d103051eb530ca994a702517c01724 5679 nsca_2.9.2-1_amd64.buildinfo
69189db4582b9361a9060bc01083396cf21beff3 33804 nsca_2.9.2-1_amd64.deb
Checksums-Sha256:
1aa0ba13bc81268b9e665f1c93f7eab98dae3551b41e50c1fff01e29234abfa0 1980
nsca_2.9.2-1.dsc
96eb04ef695873ce462e3f8db08e8a49456ff9595d11acf70a3dd8a2c4af3b5e 117299
nsca_2.9.2.orig.tar.gz
cb49fd2a8282b54af38f50dd64327abdd12b03c1e46e1e0f9b5e6e3b88150827 19948
nsca_2.9.2-1.debian.tar.xz
9b33ef2644e148d9a061b5acdc7f8891f53af0827612bc573dc3d3179d85477e 24452
nsca-client-dbgsym_2.9.2-1_amd64.deb
2a79750f238a1e4252e920dd56926ab81ac455d680434b4048e78d9c76802f1b 18884
nsca-client_2.9.2-1_amd64.deb
b680f87ce7f7826231ee8e18f35ebc3a87628f66f3956eeac4ea3754d4a11e11 37946
nsca-dbgsym_2.9.2-1_amd64.deb
4446e01eb162cf7556c87256249977121e3eb12464a53edcf25e2c11b93099a3 5679
nsca_2.9.2-1_amd64.buildinfo
8f214a5599ea21c47fed0cf5e295f7c85c2eac247b319c4fcad02b6f1d5de629 33804
nsca_2.9.2-1_amd64.deb
Files:
b0da9e30c4902250428a44da8d0cb851 1980 net optional nsca_2.9.2-1.dsc
43f638c51367a3170476ed106fbb4858 117299 net optional nsca_2.9.2.orig.tar.gz
aa779f29d060e2dd2b937d53b3706ae1 19948 net optional nsca_2.9.2-1.debian.tar.xz
fb9e11b271a054d0648d4ec5dd608431 24452 debug extra
nsca-client-dbgsym_2.9.2-1_amd64.deb
a30269a0d75fbc4391a976d7d40e37ad 18884 net optional
nsca-client_2.9.2-1_amd64.deb
b95b809005fe4f3a7a0b57e4c2095227 37946 debug extra
nsca-dbgsym_2.9.2-1_amd64.deb
03db7dd44af847cb6598648116fb8b9c 5679 net optional nsca_2.9.2-1_amd64.buildinfo
58b67125ccddff295265be3a27b60020 33804 net optional nsca_2.9.2-1_amd64.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAEBCgAGBQJYSuxwAAoJEGdQ8QrojUrxwWwP/1GO7czPGN5FFXu3EcAP0f8L
rn3xtuJXBtD6ypEuzhj7rwilRlA1G8p01IUQ0Bq/maMHPrMiLVLaU3nP6xL3COPC
vbsiQCvIrpqG0L4YD2oj+wo4slh998sDJ6oMHS+0bLJ3sBew6V9a1S/csQA17pr4
PwxEpTvKpE8Lbb+5q4E3mTM7R/0GjAKDENRhlgQ25gdlDQKJlGhZySg+HuxIMVpI
11XAWHf335+L2q/yhivaMetDdtfV0W16ts1hkNS2YQT3WOxPA8A2YX5y7EmDSYbn
17bSfXC4gjQrf9YFUbffxN+YBK9j8Y2pd0ZlMlBbTFGEYR7mOHQc6PZslM6U8XcH
vodQ1ygErWQbqAac8mECa6ObI43A8firJr8kfwej3swXVIvH5lrP/HowB3zau839
AGGhXBCq47vRrWl08ehsA3bs4Sy7E3tBNxUEij89v5WnhjrOofBia9PkXeOBxyKn
I+789it1hyFKzPw0bj//QmlvEsRojXKxLcblCRXGWf8yHSggIMDQiiP+JW8fmLfM
cmQmbrrcsGx6ONSUqjxgO03AdsyVubRIUsSujU/XebcAKB+LKofXIXSQ4Ohetk1W
hHvt0E3lwBAz25jUCExue8ndMEm3hw/ne9abNzHR41oG6gWGZGLbjWHxwXAT5tU/
I6IccWqZynuZghxMJeA3
=SZr6
-----END PGP SIGNATURE-----
--- End Message ---