finger segmentation fault when pty not found

Bug #1905152 reported by Peter Benie
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bsd-finger (Ubuntu)
Undecided
Unassigned

Bug Description

Example error:
finger: /dev//pts/3: No such file or directory
Login Name Tty Idle Login Time Office Office Phone
Segmentation fault (core dumped)

This crash can happen if the utmp entry references a terminal that is no longer allocated. In this case, it prints an error message (eg. finger: /dev//pts/3: No such file or directory), but w->idletime and w->writable are not initialised in that code path. w->idletime now contains junk, which is fed into gmtime(&w->idletime). The return value from gmtime is deferenced without checking if it returns NULL.

Description: Ubuntu 18.04.5 LTS
Release: 18.04

finger:
  Installed: 0.17-15.1
  Candidate: 0.17-15.1
  Version table:
 *** 0.17-15.1 500
        500 http://ubuntu.eng.cam.ac.uk/ubuntu bionic/universe amd64 Packages
        100 /var/lib/dpkg/status

Revision history for this message
Peter Benie (pjb1008) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "finger-idletime.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers