Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1018879: finger segfaults with "finger: /dev//pts/6: No such file or directory"

69 views
Skip to first unread message

Ralph Aichinger

unread,
Sep 1, 2022, 6:30:04 AM9/1/22
to
Package: finger
Version: 0.17-17
Severity: normal
X-Debbugs-Cc: r...@pi.h5.or.at

Dear Maintainer, I am not even sure this is a bug in finger, maybe
there is just crap in utmp/wtmp, and finger has no way of behaving
differently, but as it is a segfault, I report it nevertheless.

finger segfaults on me, as in:
ralph@pi:~$ finger
finger: /dev//pts/6: No such file or directory
Login Name Tty Idle Login Time Office Office Phone
ralph Ralph Aichinger pts/0 1:11 Sep 1 10:46 (IP redacted)
ralph Ralph Aichinger pts/1 Sep 1 12:15 (IP redacted)
ralph Ralph Aichinger pts/2 Sep 1 12:17 (IP redacted)
Segmentation fault

while e.g. w or who work just fine

ralph@pi:~$ w
12:21:02 up 54 days, 14:51, 5 users, load average: 0.08, 0.04, 0.01
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
ralph pts/0 83.XXX.XXX.XXX 10:46 1:15m 0.06s 0.06s -bash
ralph pts/1 83.XXX.XXX.XXX 12:15 22.00s 3.56s 0.39s /usr/bin/nvim /tmp/reportbug-finger-20220901121727-8h0p
ralph pts/2 83.XXX.XXX.XXX 12:17 3:26 0.06s 0.06s -bash
ralph pts/3 83.XXX.XXX.XXX 12:20 6.00s 0.05s 0.00s w

ralph@pi:~$ ls /dev/pts/
0 1 2 3 ptmx

-- System Information:
Debian Release: 11.4
APT prefers stable
APT policy: (500, 'stable')
Architecture: arm64 (aarch64)

Kernel: Linux 5.10.0-13-arm64 (SMP w/4 CPU threads)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages finger depends on:
ii libc6 2.31-13+deb11u3

finger recommends no packages.

finger suggests no packages.

-- no debconf information

Patrice DUROUX

unread,
Feb 13, 2023, 4:20:04 AM2/13/23
to
Package: finger
Version: 0.17-17
Followup-For: Bug #1018879

Dear Maintainer,

Same trouble on my side with a Debian Sid amd64 system
and here is what coredumpctl says:

Stack trace of thread 3773275:
#0 0x000055d59ac16ad5 stimeprint (finger + 0x3ad5)
#1 0x000055d59ac15779 main (finger + 0x2779)
#2 0x00007f067262118a __libc_start_call_main (libc.so.6 + 0x2718a)
#3 0x00007f0672621245 __libc_start_main_impl (libc.so.6 + 0x27245)
#4 0x000055d59ac1599a _start (finger + 0x299a)
ELF object binary architecture: AMD x86-64

Regards,
Patrice

-- System Information:
Debian Release: bookworm/sid
APT prefers unstable-debug
APT policy: (500, 'unstable-debug'), (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.0.0-6-amd64 (SMP w/24 CPU threads; PREEMPT)
Kernel taint flags: TAINT_FIRMWARE_WORKAROUND
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages finger depends on:
ii libc6 2.36-8

Patrice Duroux

unread,
Feb 13, 2023, 5:00:04 AM2/13/23
to
Looking into this, I found this note:

usr.bin/finger/util.c 1.29

In find_idle_and_ttywrite(), initialize idletime and writable to 0
when stat() fails. this prevents a coredump later in stimeprint()
due to gmtime() returning NULL for an uninitialized idletime.
[chs, ticket #1137]

here :
http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/doc/Attic/CHANGES-7.1?rev=1.1.2.106.2.2&content-type=text/plain

Regarding https://sources.debian.org/src/bsd-finger/0.17-17/finger/util.c/
it seems that the version here is:

#ifndef lint
/*static char sccsid[] = "from: @(#)util.c 5.14 (Berkeley) 1/17/91";*/
char util_rcsid[] = "$Id: util.c,v 1.18 1999/09/28 22:53:58 netbug Exp $";
#endif /* not lint */

I do not know if the Linux port of those BSD tools is still maintained somewhere
and how hard it is to package them into Debian.

Sure here: http://ftp.linux.org.uk/pub/linux/Networking/netkit/
everything seems frozen since 2000-07-31.

There is also: http://ftp.linux.org.uk/pub/linux/Networking/netkit-devel/
where it exists a 0.18-pre1 version dating 2002-08-01.

But I hope it helps!
0 new messages