Hello,
I do have a freshly installed system Rocky Linux 9.6 (Blue Onyx) with a
wget 1.21.1 and rkhunter 1.4.6 installed from repositories, glibc is
version 2.34.
Sometimes wget throws an error when called by rkhunter. (Unfortunately I
do have a German system so I just have the German messages)
It does not throw the error when used in other instances, at least I had
not seen it.
/bin/rkhunter: Zeile 7550: 397708 Speicherzugriffsfehler (Speicherabzug
geschrieben) /bin/wget -q -O "/var/lib/rkhunter/rkhunter.upd.Sec52siO9R"
http://rkhunter.sourceforge.net/1.4/programs_bad.dat 2> /dev/null
Translation by ChatGPT:
/bin/rkhunter: line 7550: 397708 Segmentation fault (core dumped)
/bin/wget -q -O "/var/lib/rkhunter/rkhunter.upd.Sec52siO9R"
http://rkhunter.sourceforge.net/1.4/programs_bad.dat 2> /dev/null
So I have figured that the problem lies with wget.
Checking dmesg
--------------
dmesg | grep wget
[21017.289809] wget[33514]: segfault at 1 ip 00007f69f8d65e3d sp
00007ffe2b8aa058 error 4 in libc.so.6[7f69f8c28000+175000] likely on CPU
0 (core 0, socket 0)
[21198.953484] wget[50741]: segfault at 1 ip 00007fd472365e3d sp
00007ffcd3811948 error 4 in libc.so.6[7fd472228000+175000] likely on CPU
2 (core 0, socket 2)
[21202.668215] wget[50757]: segfault at 1 ip 00007f49bf965e3d sp
00007fff64280d18 error 4 in libc.so.6[7f49bf828000+175000] likely on CPU
2 (core 0, socket 2)
[21835.627076] wget[50971]: segfault at 1 ip 00007fd8e7365e3d sp
00007ffc07fc07c8 error 4 in libc.so.6[7fd8e7228000+175000] likely on CPU
1 (core 0, socket 1)
[21929.491551] wget[51055]: segfault at 1 ip 00007f050d765e3d sp
00007ffd77d763b8 error 4 in libc.so.6[7f050d628000+175000] likely on CPU
1 (core 0, socket 1)
[107505.730188] wget[302437]: segfault at 1 ip 00007f155d565e3d sp
00007ffe5ddc7d38 error 4 in libc.so.6[7f155d428000+175000] likely on CPU
3 (core 0, socket 3)
I tried to reinstall wget and glibc without success, the error still is
thrown.
I tried to debug the error, though I am not an expert and also it took a
while as the error is not thrown on a regular basis, I had to repeat it
several times, at least this is the backtrace:
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7965e3d in __strlen_avx2_rtm () from /lib64/libc.so.6
Missing separate debuginfos, use: dnf debuginfo-install
glibc-2.34-168.el9_6.20.x86_64 gnutls-3.8.3-6.el9.x86_64
libffi-3.4.2-8.el9.x86_64 libidn2-2.3.0-7.el9.x86_64
libpsl-0.21.1-5.el9.x86_64 libtasn1-4.16.0-9.el9.x86_64
libunistring-0.9.10-15.el9.x86_64 libuuid-2.37.4-21.el9.x86_64
nettle-3.10.1-1.el9.x86_64 p11-kit-0.25.3-3.el9_5.x86_64
pcre2-10.40-6.el9.x86_64 zlib-1.2.11-40.el9.x86_64
(gdb) bt
#0 0x00007ffff7965e3d in __strlen_avx2_rtm () from /lib64/libc.so.6
#1 0x00007ffff78606c8 in __vfprintf_internal () from /lib64/libc.so.6
#2 0x00007ffff787f55a in __vsnprintf_internal () from /lib64/libc.so.6
#3 0x00007ffff791d255 in __snprintf_chk () from /lib64/libc.so.6
#4 0x000055555558808c in snprintf (__fmt=0x5555555c2895 "%.*f %s",
__n=20, __s=0x5555555dc0c0 <res> "3,46 ") at /usr/include/bits/stdio2.h:54
#5 retr_rate (bytes=<optimized out>, secs=<optimized out>) at
/usr/src/debug/wget-1.21.1-8.el9_4.x86_64/src/retr.c:798
#6 0x0000555555583066 in http_loop (u=0x555555605820,
original_url=0x555555603430, newloc=0x7fffffffe0a8,
local_file=0x7fffffffe0a0, referer=<optimized out>, dt=0x7fffffffe2a8,
proxy=0x0, iri=0x555555603400)
at /usr/src/debug/wget-1.21.1-8.el9_4.x86_64/src/http.c:4745
#7 0x000055555558d4bb in retrieve_url (orig_parsed=0x555555603430,
origurl=0x7fffffffe7a8
"http://rkhunter.sourceforge.net/1.4/suspscan.dat", file=0x7fffffffe2b8,
newloc=0x7fffffffe2b0, refurl=0x0,
dt=0x7fffffffe2a8, recursive=false, iri=0x555555603400,
register_status=true) at
/usr/src/debug/wget-1.21.1-8.el9_4.x86_64/src/retr.c:983
#8 0x000055555556214d in main (argc=<optimized out>,
argv=0x7fffffffe508) at
/usr/src/debug/wget-1.21.1-8.el9_4.x86_64/src/main.c:2167
Is this a wget or a glibc error?
With regards,
Markus