Bug 203572 - net-mgmt/nagios-plugins: check_ssh segfaults on dead host [patch]
Summary: net-mgmt/nagios-plugins: check_ssh segfaults on dead host [patch]
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Mathieu Arnold
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2015-10-06 06:32 UTC by Johan Ström
Modified: 2015-10-08 12:16 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (mat)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johan Ström 2015-10-06 06:32:00 UTC
A regression in 2.1.x causes check_ssh (and probably others) to segfault if the remote host does not reply to a connect().

For every checked service which is down, this results in segfaulting processes every 5 minutes (and spamming of logs with 'pid 67060 (check_ssh), uid 181: exited on signal 11').

Patch has been submitted upstream, but no attention has been given to it for a month.
https://github.com/nagios-plugins/nagios-plugins/pull/99

Patch: https://github.com/stromnet/nagios-plugins/commit/a18f60cc610c690cc0756bc258b8202a1541a067

This seems trigger segfaults on FreeBSD only, could it be locally patched until upstream reacts?

Thanks!
Comment 1 Mathieu Arnold freebsd_committer freebsd_triage 2015-10-08 11:30:24 UTC
Mmmm, I thought I fixed this a while back.
Comment 2 commit-hook freebsd_committer freebsd_triage 2015-10-08 12:15:29 UTC
A commit references this bug:

Author: mat
Date: Thu Oct  8 12:14:37 UTC 2015
New revision: 398816
URL: https://svnweb.freebsd.org/changeset/ports/398816

Log:
  Fix a regression where plugins would segfault if the monitored tcp port
  is closed.

  PR:		203572
  Submitted by:	johan stromnet se
  Obtained from:	https://github.com/stromnet/nagios-plugins/commit/a18f60cc610c690cc0756bc258b8202a1541a067
  MFH:		2015Q4
  Sponsored by:	Absolight

Changes:
  head/net-mgmt/nagios-plugins/Makefile
  head/net-mgmt/nagios-plugins/files/patch-plugins_netutils.c
Comment 3 commit-hook freebsd_committer freebsd_triage 2015-10-08 12:16:33 UTC
A commit references this bug:

Author: mat
Date: Thu Oct  8 12:16:06 UTC 2015
New revision: 398818
URL: https://svnweb.freebsd.org/changeset/ports/398818

Log:
  MFH: r398816

  Fix a regression where plugins would segfault if the monitored tcp port
  is closed.

  PR:		203572
  Submitted by:	johan stromnet se
  Obtained from:	https://github.com/stromnet/nagios-plugins/commit/a18f60cc610c690cc0756bc258b8202a1541a067
  Sponsored by:	Absolight

Changes:
_U  branches/2015Q4/
  branches/2015Q4/net-mgmt/nagios-plugins/Makefile
  branches/2015Q4/net-mgmt/nagios-plugins/files/patch-plugins_netutils.c