Bug#784319: [Pkg-nagios-devel] Bug#784319: Segfault when running check_dhcp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 tags 784319 + pending thanks Am 05.05.15 um 12:21 schrieb Andreas Heinlein: > Since upgrading to jessie, I get this in my syslog: kernel: > check_dhcp[20879]: segfault at 21 ip 2b508d08f21e sp > 7ffc9eee20b0 error 4 in libc-2.19.so[2b508cfc1000+19f000] > > The problem seems to be already tracked and fixed here: > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198318 this was fixed by upstream in a more complete and reliable way: https://github.com/monitoring-plugins/monitoring-plugins/commit/466cb79e 5224327c29fc6b84a1cec99c2b190c5a I commited this patch into the VCS and it should be included into the next upload. Cheers, Jan. - -- Never write mail to, you have been warned! - -BEGIN GEEK CODE BLOCK- Version: 3.12 GIT d-- s+: a C+++ UL P+ L+++ E--- W+++ N+++ o++ K++ w--- O M V- PS PE Y++ PGP++ t-- 5 X R tv- b+ DI D+ G++ e++ h r+++ y - --END GEEK CODE BLOCK-- -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.19 (Darwin) iQIcBAEBCgAGBQJWEQomAAoJEAxwVXtaBlE+240QAJ/y8sPVPB3MM8Wl6wpS5lwA BdQ4RIdUoOHn4pxAt+YDAPujPpp/GWXaCb8HbRthW9DinQ9AIPjVSA/0fNyDbFT4 081MX14PJsx0SUBqhdsNS+wpLsFfw3t2ptIV6ms+V5vmnFbADEAp+ZJdneDzMBny VP58xvZS0wNYOLUtjFMc7ywlrhQ6EFPp2YoYrqZm0IV5V0/DeggrZCxptxgnOkq7 vPQHbGSOLo/BzuHXbeADU4zY0xghiaOKwDXcbANOtILlztl8ugve1Rcr+64R7bpI Cb5zMv9nUFK+y8jWODfwUw3ex5tqkQaVB2jN2durrfjMrt33E7U3ZagJkccCh4VM L4E8eaQ0fuv+f7waq7c8jMlgcJNE6YdqWo8sW0Oajx+/TOIYM2d93zoverZIKzmU jwbQjyz3m8mixHyMcLsAz5I3LjWN1Wo6VGu6hgrtcuamJwxmqLjTIN5Ag+Kfg3Za LSn47gQkUQ3lFIPCVg9xkjTSNe39v6ZKR5KfTP73JRG5Q556ED8hsRWrQl5/d8nI IJ9UYuMd5eSjh58nt2IpQnqBNJdpT+44Dwd7D+mesvISLDcpOJZW+bezdMSlREtY gdDBmOoVbzluPcxRM1HtrXbLQVP9l6tIAlD+7HnX+J1eQ0R0Gu1Ha5jbtje0jEwi gCNeuKWFuruHFImPV6Qf =Cb7c -END PGP SIGNATURE-
Bug#784319: [Pkg-nagios-devel] Bug#784319: Bug#784319: Segfault when running check_dhcp
FWIW, it worked. Here is the dpatch I created: --- SNIP --- #! /bin/sh /usr/share/dpatch/dpatch-run ## 10_check_dhcp.dpatch by aheinl...@gmx.com ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: No description. @DPATCH@ diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' monitoring-plugins-2.1.1~/plugins-root/check_dhcp.c monitoring-plugins-2.1.1/plugins-root/check_dhcp.c --- monitoring-plugins-2.1.1~/plugins-root/check_dhcp.c2014-12-02 04:36:29.0 + +++ monitoring-plugins-2.1.1/plugins-root/check_dhcp.c2015-05-06 12:19:24.772947737 + @@ -323,7 +323,8 @@ #elif defined(__bsd__) /* King 2004see ACKNOWLEDGEMENTS */ -int mib[6], len; +int mib[6]; +size_tlen; char*buf; unsigned char *ptr; struct if_msghdr*ifm; @@ -1182,7 +1183,7 @@ } } -return i; +return i+1; } --- SNIP --- -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#784319: [Pkg-nagios-devel] Bug#784319: Bug#784319: Bug#784319: Segfault when running check_dhcp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Hi Andreas, Am 06.05.15 um 14:43 schrieb Andreas Heinlein: FWIW, it worked. cool! Could please send me over your output from your shell with the fixed binary? Many thanks, Jan. - -- Never write mail to w...@spamfalle.info, you have been warned! - -BEGIN GEEK CODE BLOCK- Version: 3.12 GIT d-- s+: a C+++ UL P+ L+++ E--- W+++ N+++ o++ K++ w--- O M V- PS PE Y++ PGP++ t-- 5 X R tv- b+ DI D+ G++ e++ h r+++ y - --END GEEK CODE BLOCK-- -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJVShDwAAoJEAxwVXtaBlE+kgYP/AxSVxNPvvN8a/gO0o6jlqAq BGEYzaWsDr+5fKSnxqAHT4lsf2cRys0pSTq2Ac9IgRhT4P7FZA0zuX8TtmoHcqXu 6G91oahVdAUSy3qbc6xRetORQdb68C2g7Z5RPWuGI5v63P+HFAdVEHNXDqWd8H+T JR0Oh+tbPxvEQ1DzpYHzJ2Z3hYJEKVGZJMTB08mFSKaFf+kLAkKvUyJQcUGtsjff 3TD1IQpvqHBw3+R2bswabxB1EQgp/YUhQsWodB84h5O7/cMgv2+zpzs/1YAKZv2K SAtCX5uCTTeGZ8+0ofGFTex1qH72xcqdSe7cyOcqRmevDDvd43I6bpB/tMbOJumA 1T1bC/UXIhUwrhCIwJYax1dgw4txnKmr70Dms/PTnQGReMOiyXgYT6MHney1SAIa qy9SCwhrROa3aexqp/AaV2mXm8yEygkfMbmZ8SVs9/LWI/wNWsHKPScSN6nIsd7T gShiYpihSnLc4QFZbTgAXCKXArP4DYqrUEn/uzHad4ZVLA1USL6YlxBrfjys0e2V bh5Dr4vR41BxuB1yKsSRl81zWxaDqAgPSAO6LXt2+TnXlcMevDJBuBKlX32QIdNN yraZrANpzGNXd1mgruAJFmyn6itkHKEkvzledI1PclKvLfNvbQGpJZ9YIkxAjde7 8Y3K4fNrAy7dsZvUFCA+ =t9ge -END PGP SIGNATURE- -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#784319: [Pkg-nagios-devel] Bug#784319: Bug#784319: Segfault when running check_dhcp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Andreas, Am 05.05.15 um 14:51 schrieb Andreas Heinlein: Everything worked under wheezy with icinga2 and the plugins from wheezy-backports, which I believe were the same version as in jessie. If you need any further information, just let me know. this is very interesting. So it doesn't seems that monitoring-plugins does trigger it, as you uses the same package like on wheezy (just linked against older libs). It looks like you have installed libcap2-bin and using the capabilities features of the kernel to run check_dhcp. Maybe you can try to run check_dhcp on your shell as non-root user? It's just a wild guess, but it may work on your root shell, cause your higher privileges, but not from the worker, cause it has no privileges. Thanks, Jan. - -- Never write mail to w...@spamfalle.info, you have been warned! - -BEGIN GEEK CODE BLOCK- Version: 3.12 GIT d-- s+: a C+++ UL P+ L+++ E--- W+++ N+++ o++ K++ w--- O M V- PS PE Y++ PGP++ t-- 5 X R tv- b+ DI D+ G++ e++ h r+++ y - --END GEEK CODE BLOCK-- -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.19 (Darwin) Comment: GPGTools - http://gpgtools.org iQIcBAEBAgAGBQJVSMIzAAoJEAxwVXtaBlE+5fgP/2h2PBbj5sp0lFqMPSqy4HdC yGbwrQ0f+njZ9049okqXvIf54TAEhGdWtevj+EGNIIeEIsEZ56v2mgVqDFgpRoaK eUHHo6Ryo9RqrV6OvKp087JHCDu/5KMZbNJfB9oC2j3lrLnHUhejhgBueeSncG9L Zn1XtwCGXlnmHyDn556BCHETVLukVJfvAiXsjfY9WbgP8KVR9pbddJZRKmkkVsdi W31smvPt0KRLJIwi+tk2qmJcM7VFtoIexpTunvDQHoVSEcADPFBbt30GZdjSXYSM unJK5k3d+ONTlfEKUrWlBuuRSQMFpryxfYNFy/7SgkLm0v+56ETXR10pgtarWg3k ApPQVV4Nlkzlz8jHuvD44sL306CdQoDE1NEEtoCtGuSjiIuwuywNNKjP8WJwYHCG hiIIpj6OhpAjWDBIIYcfWoJeS5QU0xVJeV8q7bF5iJtZnECVEmQWSgHuWymLw5LO 15DD2fluuLUSIXV/ynhXKnFwl7VkFlXPMHFvdnM4SrCXw2ki/yuPS0OCF3AbDK8h zUigc0kId3n6QhHxt62A1BCdmJhw8Fco/U2TmblEWKk6XPoHIGCuNcbUOv5FDp2r FNZh5BUyIO8U9I8+Vt3kKCpkkhMMDJgpkRgdM+VRGvIZRId04Pxs8HCk8QGjEw76 WWynhQqP01oVDGmYy5qZ =KUAj -END PGP SIGNATURE- -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#784319: [Pkg-nagios-devel] Bug#784319: Segfault when running check_dhcp
Of course, here it is. Everything worked under wheezy with icinga2 and the plugins from wheezy-backports, which I believe were the same version as in jessie. If you need any further information, just let me know. -- System Information: Debian Release: 8.0 APT prefers stable APT policy: (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 3.16.0-4-amd64 (SMP w/2 CPU cores) Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages monitoring-plugins-basic depends on: ii iputils-ping 3:20121221-5+b2 ii libc6 2.19-18 ii libssl1.0.01.0.1k-3 ii monitoring-plugins-common 2.1.1-1 ii procps 2:3.3.9-9 ii ucf3.0030 Versions of packages monitoring-plugins-basic recommends: ii libcap2-bin 1:2.24-8 Versions of packages monitoring-plugins-basic suggests: pn icinga | icinga | nagios3 none -- no debconf information -- Command definition: object Service dhcp { import generic-service host_name = localhost check_command = dhcp vars.dhcp_serverip = 172.16.9.3 vars.dhcp_requestedip = 172.16.9.254 vars.dhcp_mac = aa:bb:cc:dd:ee:ff vars.dhcp_interface = eth1 vars.sla = 24x7 } -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#784319: [Pkg-nagios-devel] Bug#784319: Segfault when running check_dhcp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Andreas, thanks for taking the time and reporting this issue. Am 05.05.15 um 12:21 schrieb Andreas Heinlein: Since upgrading to jessie, I get this in my syslog: kernel: check_dhcp[20879]: segfault at 21 ip 2b508d08f21e sp 7ffc9eee20b0 error 4 in libc-2.19.so[2b508cfc1000+19f000] Can you give me some more details for trying to repoduce the problem? For example, which architecture are you using, which kernel. Anyways .. also you command definition could help. Thanks, Jan. - -- Never write mail to w...@spamfalle.info, you have been warned! - -BEGIN GEEK CODE BLOCK- Version: 3.12 GIT d-- s+: a C+++ UL P+ L+++ E--- W+++ N+++ o++ K++ w--- O M V- PS PE Y++ PGP++ t-- 5 X R tv- b+ DI D+ G++ e++ h r+++ y - --END GEEK CODE BLOCK-- -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.19 (Darwin) Comment: GPGTools - http://gpgtools.org iQIcBAEBAgAGBQJVSLkWAAoJEAxwVXtaBlE+UOEQAKBb01qTY3pd54q0c5ecYV+R 0akLnnVTjXht4J1KAFPDN/EQODmrhtwmgrh3HldpGrIqDOVyrT1xoTyN2bCMgd2D 7cE9lrNmMRvJKLQ/XZQRyfQ5n/xidP8GOOPr9kD64lF1u5DAxflCgRGnydGkmweK FPbFbChnZnoujIOukcbXiBMnLCkpgaFQIk6jbM2zaSOBJ4DVdC9TN3EP2N7kH51E Fdmx6qNvSuxbmumi460ACKI5Q9mK73rg6tWBrMdgx4vHwZdEpqAlpdWktB0u0x0s CQnpq21lZkulcdgmaZF3Jk86nXc6IsxCrANCFW8RGRCozS8IjNXhhWCpx98pRMnG 0TLcg9aE0molUxr2Rzds5Gy/eNeGeBlEInJXmdS4eSKywD9TpczVdQSB9FbsR7M6 WjWYHiV/DLF5bDCMviD5roT9ODQe7CQ7gJc1kOhuglbSWk2o169SnNu+5x6NfeEa cVBePMSeX+SFvVSXYso4h1ncKf3gRfFddPEVBVHRkAXXaK6cp/53L+brLewmk5wj 5sxAyQemlzslbxEKyHWjtfvQI/lLRMp3Vb+20tidR7m7ee/vF3ncv7B+Bb1cHYtv +/UKfn8FMgLBoLVjvmXfBBfoCMFqD3RAdyK7tVeujZlS6rrV8mugjOx/2zw5NLND ZQ64O0HnWJ5v1Zz7t1jz =kvlt -END PGP SIGNATURE- -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#784319: [Pkg-nagios-devel] Bug#784319: Bug#784319: Segfault when running check_dhcp
I switched from root to 'nagios' with 'su -s /bin/bash nagios', then ran '/usr/lib/nagios/plugins/check_dhcp -v -s 172.16.9.3 -r 172.16.9.254 -i eth1 -m aa:bb:cc:dd:ee:ff' This is the result: --- Requested server address: 172.16.9.3 Hardware address: aa:bb:cc:dd:ee:ff DHCP socket: 3 DHCPDISCOVER to 255.255.255.255 port 67 DHCPDISCOVER XID: 901953561 (0x35C2B819) DHCDISCOVER ciaddr: 0.0.0.0 DHCDISCOVER yiaddr: 0.0.0.0 DHCDISCOVER siaddr: 0.0.0.0 DHCDISCOVER giaddr: 0.0.0.0 send_dhcp_packet result: 548 recv_result_1: 315 recv_result_2: 315 receive_dhcp_packet() result: 315 receive_dhcp_packet() source: 172.16.9.3 Result=OK DHCPOFFER from IP address 172.16.9.3 via 172.16.9.3 DHCPOFFER XID: 901953561 (0x35C2B819) DHCPOFFER chaddr: AABBCCDDEEFF DHCPOFFER ciaddr: 0.0.0.0 DHCPOFFER yiaddr: 172.16.9.254 DHCPOFFER siaddr: 172.16.9.3 DHCPOFFER giaddr: 0.0.0.0 Option: 53 (0x01) Option: 54 (0x04) Option: 51 (0x04) Option: 1 (0x04) Option: 6 (0x04) Option: 12 (0x0F) Option: 28 (0x04) Option: 42 (0x04) Option: 44 (0x04) Option: 15 (0x0A) Lease Time: 3600 seconds Renewal Time: 0 seconds Rebinding Time: 0 seconds Added offer from server @ 172.16.9.3 of IP address 172.16.9.254 No (more) data received (nfound: 0) Result=ERROR Total responses seen on the wire: 1 Valid responses for this machine: 1 DHCP Server Match: Offerer=172.16.9.3 Requested=172.16.9.3 OK: Received 1 DHCPOFFER(s), 1 of 1 requested servers responded, requested address (172.16.9.254) was offered, max lease time = 3600 sec. --- So it works, though the Result=ERROR thing looks strange. The bug report I linked above claims that this patch fixes it: --- --- plugins-root/check_dhcp.c.orig2014-07-06 17:55:03 UTC +++ plugins-root/check_dhcp.c @@ -323,7 +323,8 @@ int get_hardware_address(int sock,char * #elif defined(__bsd__) /* King 2004see ACKNOWLEDGEMENTS */ -int mib[6], len; +int mib[6]; +size_t len; char*buf; unsigned char *ptr; struct if_msghdr*ifm; @@ -1182,7 +1183,7 @@ int call_getopt(int argc, char **argv){ } } -return i; +return i+1; } --- I will give it a try tomorrow, no time left for today ;-) -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#784319: Segfault when running check_dhcp
Package: monitoring-plugins-basic Version: 2.1.1-1 Since upgrading to jessie, I get this in my syslog: kernel: check_dhcp[20879]: segfault at 21 ip 2b508d08f21e sp 7ffc9eee20b0 error 4 in libc-2.19.so[2b508cfc1000+19f000] The problem seems to be already tracked and fixed here: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198318 Note that I can confirm this is not reproducible when running check_dhcp from the command line. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org