Bug#1029720: [Pkg-nagios-devel] Bug#1029720: monitoring-plugins-contrib: false positive w bookworm kernel: "running kernel does not match on-disk kernel image'

2023-02-26 Thread Hilmar Preuße

Am 26.01.2023 um 17:41 teilte Holger Levsen mit:

Hi,


on a system running bookworm and the latest amd64 kernel
/usr/lib/nagios/plugins/check_running_kernel warns me that the running kernel 
doesnt
match the on-disk kernel, while it *is* running the latest kernel.
(line breaks added for better readability.)


In the moment I'm trying to understand how the script works. My current
state is: it checks, which compression mode is used, for the kernel
images in /boot/ (which seems to be xz for bookworm), then it
decompresses the xz compressed part of the kernel images and searches
for "Linux version". The part after "Linux version" is compared to the
content of /proc/version. Unfortunately there is a difference:

/boot/vmlinuz:

Linux version 6.1.0-5-amd64 (debian-ker...@lists.debian.org) (gcc-12
(Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) # SMP
PREEMPT_DYNAMIC Debian 6.1.12-1 (2023-02-15)

/proc/version

Linux version 6.1.0-5-amd64 (debian-ker...@lists.debian.org) (gcc-12
(Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP
PREEMPT_DYNAMIC Debian 6.1.12-1 (2023-02-15)

So it could be a bug in the kernel configuration too. All this worked
fine on Debian stable. I did not check if there was another compression
method in use.

I could not dig further, I failed to extract the xz compressed part of
the kernel correctly. Not sure if this is useful.

Hilmar
--
sigfault



Bug#1029720: [Pkg-nagios-devel] Bug#1029720: monitoring-plugins-contrib: false positive w bookworm kernel: "running kernel does not match on-disk kernel image'

2023-01-30 Thread Jan Wagner

Hi Holger,

Am 30.01.23 um 12:33 schrieb Holger Levsen:

$ scp ./nagios-plugins-contrib-38.20230124/dsa/checks/dsa-check-running-kernel 
osuosl168-amd64.debian.net:

and then there:

holger@osuosl168-amd64:~ $ bash dsa-check-running-kernel
WARNING: Running kernel does not match on-disk kernel image: [Linux version 
6.1.0-1-amd64 (debian-ker...@lists.debian.org) (gcc-12 (Debian 12.2.0-13) 
12.2.0, GNU ld (GNU Binutils for Debian) 2.39.90.20221231) #1 SMP 
PREEMPT_DYNAMIC Debian 6.1.4-1 (2023-01-07) != Linux version 6.1.0-1-amd64 
(debian-ker...@lists.debian.org) (gcc-12 (Debian 12.2.0-13) 12.2.0, GNU ld (GNU 
Binutils for Debian) 2.39.90.20221231) # SMP PREEMPT_DYNAMIC Debian 6.1.4-1 
(2023-01-07)]
holger@osuosl168-amd64:~ $ md5sum dsa-check-running-kernel
155205740a07f98f13bf6045b317c505  dsa-check-running-kernel

so, no, doesnt help.


thanks for confirming.

As I don't have a bookworm system (with running kernel) at hand, I can't 
go deeper into debugging this issue until I get hands on it.


Sorry Jan



Bug#1029720: [Pkg-nagios-devel] Bug#1029720: monitoring-plugins-contrib: false positive w bookworm kernel: "running kernel does not match on-disk kernel image'

2023-01-30 Thread Holger Levsen
Hi Jan,

On Mon, Jan 30, 2023 at 11:34:31AM +0100, Jan Wagner wrote:
> can you try the version from unstable
> (https://packages.debian.org/sid/nagios-plugins-contrib) which I uploaded a
> few days ago?

$ scp ./nagios-plugins-contrib-38.20230124/dsa/checks/dsa-check-running-kernel 
osuosl168-amd64.debian.net:

and then there:

holger@osuosl168-amd64:~ $ bash dsa-check-running-kernel 
WARNING: Running kernel does not match on-disk kernel image: [Linux version 
6.1.0-1-amd64 (debian-ker...@lists.debian.org) (gcc-12 (Debian 12.2.0-13) 
12.2.0, GNU ld (GNU Binutils for Debian) 2.39.90.20221231) #1 SMP 
PREEMPT_DYNAMIC Debian 6.1.4-1 (2023-01-07) != Linux version 6.1.0-1-amd64 
(debian-ker...@lists.debian.org) (gcc-12 (Debian 12.2.0-13) 12.2.0, GNU ld (GNU 
Binutils for Debian) 2.39.90.20221231) # SMP PREEMPT_DYNAMIC Debian 6.1.4-1 
(2023-01-07)]
holger@osuosl168-amd64:~ $ md5sum dsa-check-running-kernel 
155205740a07f98f13bf6045b317c505  dsa-check-running-kernel

so, no, doesnt help.

(the md5sum is just there to show you which version I tried, 38.20230124.)


-- 
cheers,
Holger

 ⢀⣴⠾⠻⢶⣦⠀
 ⣾⠁⢠⠒⠀⣿⡁  holger@(debian|reproducible-builds|layer-acht).org
 ⢿⡄⠘⠷⠚⠋⠀  OpenPGP: B8BF54137B09D35CF026FE9D 091AB856069AAA1C
 ⠈⠳⣄

三人成虎- Three men make a tiger.
In other words, if one guy says "there's a tiger over there" you might not 
believe 
them, if three guys in a row all say this- you think there's a tiger there. A 
lie, 
repeated often enough, will be accepted as truth.


signature.asc
Description: PGP signature


Bug#1029720: [Pkg-nagios-devel] Bug#1029720: monitoring-plugins-contrib: false positive w bookworm kernel: "running kernel does not match on-disk kernel image'

2023-01-30 Thread Jan Wagner

Hi Holger,

Am 26.01.23 um 17:41 schrieb Holger Levsen:

on a system running bookworm and the latest amd64 kernel
/usr/lib/nagios/plugins/check_running_kernel warns me that the running kernel 
doesnt
match the on-disk kernel, while it*is*  running the latest kernel.
(line breaks added for better readability.)


thanks for your bugreport.

can you try the version from unstable 
(https://packages.debian.org/sid/nagios-plugins-contrib) which I 
uploaded a few days ago?


Thank Jan