Bug 203044

Summary: net-mgmt/nagios-plugins: check_smtp, check_tcp segfault when monitored port is closed
Product: Ports & Packages Reporter: Kyle <kyle.dippery>
Component: Individual Port(s)Assignee: Mathieu Arnold <mat>
Status: Closed FIXED    
Severity: Affects Some People Flags: bugzilla: maintainer-feedback? (mat)
Priority: ---    
Version: Latest   
Hardware: amd64   
OS: Any   

Description Kyle 2015-09-11 15:20:18 UTC
After this week's update to nagios-plugins 2.1.1, check_smtp and check_tcp segfault when the port they are meant to be monitoring is closed:

 nagios@grackle:/usr/local/libexec/nagios>./check_smtp -V
check_smtp v (nagios-plugins 2.1.1)

 nagios@grackle:/usr/local/libexec/nagios>./check_smtp -H localhost
Segmentation fault

 nagios@grackle:/usr/local/libexec/nagios>./check_tcp -V
check_tcp v (nagios-plugins 2.1.1)

 nagios@grackle:/usr/local/libexec/nagios>./check_tcp -H localhost -p 26
Segmentation fault

Also when -v is used with no other arguments (I found this by accident, I was aiming for -V):

 nagios@grackle:/usr/local/libexec/nagios>./check_smtp -v
HELOCMD: HELO grackle
Segmentation fault

 nagios@grackle:/usr/local/libexec/nagios>./check_tcp -v
Using service TCP
Port: 0
flags: 0x2
Segmentation fault

Host is FreeBSD 9.3-RELEASE, GENERIC kernel on amd64.

Please let me know if I can supply any further information to help resolve this.

Thanks!
Comment 1 Mathieu Arnold freebsd_committer freebsd_triage 2015-09-11 19:08:34 UTC
Please, report that to the nagios-plugins people, it's not a FreeBSD specific problem.