monitoring-plugins 2.3.2-1 check_disk crashes

Problems with packages? Post here, using [tags] of the package name.

monitoring-plugins 2.3.2-1 check_disk crashes

Postby afunix » Thu Oct 27, 2022 4:28 pm

Hello.

check_disk from monitoring-plugins 2.3.2-1 armv7l started crashing after the recent update on October 20.
It still shows help with -h flag, it also shows error and a short usage if executed without parameters.
The moment you pass warning and critical parameters it crashes.

$this->bbcode_second_pass_code('', '
# gdb /usr/lib/monitoring-plugins//check_disk
<...>
(No debugging symbols found in /usr/lib/monitoring-plugins//check_disk)
(gdb) r -c10% -w20% -l
Starting program: /usr/lib/monitoring-plugins/check_disk -c10% -w20% -l
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0xb6e838a4 in strlen () from /usr/lib/libc.so.6
(gdb) bt
#0 0xb6e838a4 in strlen () from /usr/lib/libc.so.6
#1 0xb6e4dc20 in ?? () from /usr/lib/libc.so.6
#2 0xf2ccb6f6 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
')
afunix
 
Posts: 4
Joined: Thu Oct 27, 2022 4:17 pm

Re: monitoring-plugins 2.3.2-1 check_disk crashes

Postby afunix » Thu Oct 27, 2022 5:37 pm

Found out the root cause.
This is fixed on monitoring-plugins master branch with https://github.com/monitoring-plugins/m ... /pull/1800
afunix
 
Posts: 4
Joined: Thu Oct 27, 2022 4:17 pm

Re: monitoring-plugins 2.3.2-1 check_disk crashes

Postby afunix » Thu Oct 27, 2022 5:39 pm

My patch until the fix is propagated to the package:
$this->bbcode_second_pass_code('', 'diff -rupNwB monitoring-plugins-2.3.2.orig/plugins/utils.c monitoring-plugins-2.3.2/plugins/utils.c
--- monitoring-plugins-2.3.2.orig/plugins/utils.c 2022-10-19 07:50:27.000000000 -0500
+++ monitoring-plugins-2.3.2/plugins/utils.c 2022-10-27 12:35:16.599819240 -0500
@@ -615,9 +615,9 @@ char *perfdata_uint64 (const char *label
char *data = NULL;

if (strpbrk (label, "'= "))
- xasprintf (&data, "'%s'=%ld%s;", label, val, uom);
+ xasprintf (&data, "'%s'=%llu%s;", label, val, uom);
else
- xasprintf (&data, "%s=%ld%s;", label, val, uom);
+ xasprintf (&data, "%s=%llu%s;", label, val, uom);

if (warnp)
xasprintf (&data, "%s%lu;", data, warn);
')
afunix
 
Posts: 4
Joined: Thu Oct 27, 2022 4:17 pm


Return to Packages

Who is online

Users browsing this forum: Baidu [Spider] and 34 guests