tlf crashes on hitting ENTER

Bug #514303 reported by Louis-Dominique Dubeau
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tlf (Ubuntu)
Fix Released
Undecided
John Nogatch

Bug Description

Binary package hint: tlf

$ lsb_release -rd
Description: Ubuntu 9.10
Release: 9.10

$ apt-cache policy tlf

tlf:
  Installed: 0.9.32.3-4
  Candidate: 0.9.32.3-4
  Version table:
 *** 0.9.32.3-4 0
        500 http://ubuntu.mirrors.tds.net karmic/universe Packages
        100 /var/lib/dpkg/status

What happened
=============

1. Execute:

$ tlf

2. Tlf starts and everything looks normal. I get the "login:". From then on, no matter what I try to do, as soon as I hit the [ENTER] key, I get a crash. Here is what I get on the terminal:

*** buffer overflow detected ***: tlf terminated
======= Backtrace: =========
/lib/libc.so.6(__fortify_fail+0x37)[0x7eff21346647]
/lib/libc.so.6[0x7eff213455f0]
/lib/libc.so.6[0x7eff21344734]
tlf[0x40e6c3]
tlf[0x42f7a6]
tlf[0x431b9e]
tlf[0x41a7a5]
/lib/libc.so.6(__libc_start_main+0xfd)[0x7eff2126dabd]
tlf[0x403819]
======= Memory map: ========
00400000-0043e000 r-xp 00000000 fc:00 40235 /usr/bin/tlf
0063d000-0063e000 r--p 0003d000 fc:00 40235 /usr/bin/tlf
0063e000-00641000 rw-p 0003e000 fc:00 40235 /usr/bin/tlf
00641000-009d1000 rw-p 00000000 00:00 0
0104e000-01090000 rw-p 00000000 00:00 0 [heap]
7eff20e34000-7eff20e4a000 r-xp 00000000 fc:00 12742 /lib/libgcc_s.so.1
7eff20e4a000-7eff21049000 ---p 00016000 fc:00 12742 /lib/libgcc_s.so.1
7eff21049000-7eff2104a000 r--p 00015000 fc:00 12742 /lib/libgcc_s.so.1
7eff2104a000-7eff2104b000 rw-p 00016000 fc:00 12742 /lib/libgcc_s.so.1
7eff2104b000-7eff2104d000 r-xp 00000000 fc:00 6773 /lib/libdl-2.10.1.so
7eff2104d000-7eff2124d000 ---p 00002000 fc:00 6773 /lib/libdl-2.10.1.so
7eff2124d000-7eff2124e000 r--p 00002000 fc:00 6773 /lib/libdl-2.10.1.so
7eff2124e000-7eff2124f000 rw-p 00003000 fc:00 6773 /lib/libdl-2.10.1.so
7eff2124f000-7eff213b5000 r-xp 00000000 fc:00 6715 /lib/libc-2.10.1.so
7eff213b5000-7eff215b4000 ---p 00166000 fc:00 6715 /lib/libc-2.10.1.so
7eff215b4000-7eff215b8000 r--p 00165000 fc:00 6715 /lib/libc-2.10.1.so
7eff215b8000-7eff215b9000 rw-p 00169000 fc:00 6715 /lib/libc-2.10.1.so
7eff215b9000-7eff215be000 rw-p 00000000 00:00 0
7eff215be000-7eff21640000 r-xp 00000000 fc:00 7119 /lib/libm-2.10.1.so
7eff21640000-7eff21840000 ---p 00082000 fc:00 7119 /lib/libm-2.10.1.so
7eff21840000-7eff21841000 r--p 00082000 fc:00 7119 /lib/libm-2.10.1.so
7eff21841000-7eff21842000 rw-p 00083000 fc:00 7119 /lib/libm-2.10.1.so
7eff21842000-7eff21859000 r-xp 00000000 fc:00 7559 /lib/libpthread-2.10.1.so
7eff21859000-7eff21a58000 ---p 00017000 fc:00 7559 /lib/libpthread-2.10.1.so
7eff21a58000-7eff21a59000 r--p 00016000 fc:00 7559 /lib/libpthread-2.10.1.so
7eff21a59000-7eff21a5a000 rw-p 00017000 fc:00 7559 /lib/libpthread-2.10.1.so
7eff21a5a000-7eff21a5e000 rw-p 00000000 00:00 0
7eff21a5e000-7eff21a9c000 r-xp 00000000 fc:00 2413 /lib/libncurses.so.5.7
7eff21a9c000-7eff21c9c000 ---p 0003e000 fc:00 2413 /lib/libncurses.so.5.7
7eff21c9c000-7eff21ca0000 r--p 0003e000 fc:00 2413 /lib/libncurses.so.5.7
7eff21ca0000-7eff21ca1000 rw-p 00042000 fc:00 2413 /lib/libncurses.so.5.7
7eff21ca1000-7eff21cbd000 r-xp 00000000 fc:00 7739 /usr/lib/libhamlib.so.2.0.9
7eff21cbd000-7eff21ebd000 ---p 0001c000 fc:00 7739 /usr/lib/libhamlib.so.2.0.9
7eff21ebd000-7eff21ebf000 r--p 0001c000 fc:00 7739 /usr/lib/libhamlib.so.2.0.9
7eff21ebf000-7eff21ec0000 rw-p 0001e000 fc:00 7739 /usr/lib/libhamlib.so.2.0.9
7eff21ec0000-7eff21edf000 r-xp 00000000 fc:00 6249 /lib/ld-2.10.1.so
7eff220b4000-7eff220b8000 rw-p 00000000 00:00 0
7eff220db000-7eff220de000 rw-p 00000000 00:00 0
7eff220de000-7eff220df000 r--p 0001e000 fc:00 6249 /lib/ld-2.10.1.so
7eff220df000-7eff220e0000 rw-p 0001f000 fc:00 6249 /lib/ld-2.10.1.so
7fff11547000-7fff1155c000 rw-p 00000000 00:00 0 [stack]
7fff115ff000-7fff11600000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
Aborted

What I expected
=============

I expected tlf not to crash.

Tags: patch
John Nogatch (jnogatch)
Changed in tlf (Ubuntu):
status: New → Confirmed
Revision history for this message
John Nogatch (jnogatch) wrote :

I found it necessary to make 3 changes:
1. The 2 digit string for the current month was obtained incorrectly.
2. FIlling the line buffer with blanks was going 1 character too far.
3. Some strcat() operations exceeded the length of the log_line[4] buffer, so it was made longer.

With these changes, tlf will start, and accept callsign entries.

tags: added: patch
Revision history for this message
Pierfrancesco Caci (pf-caci) wrote :

Hello,
I get a similar crash. Strace attached.

Revision history for this message
John Nogatch (jnogatch) wrote :

My previous patch fixes version tlf-0.9.32.3.

I see that the author has posted source for a new version: http://hermes.esrac.ele.tue.nl/TLF/tlf-1.0.0pre.tar.gz which also appears to have fixed the 3 problems that I found.

Revision history for this message
John Nogatch (jnogatch) wrote :

tlf 1.1.5 is avaiable for Ubuntu 12.04, 12.10, 13.04 at https://launchpad.net/~jnogatch/+archive/tlf

Changed in tlf (Ubuntu):
assignee: nobody → John Nogatch (jnogatch)
status: Confirmed → In Progress
Revision history for this message
Ervin Hegedüs (airween) wrote :

This is a very old bug, probably not affects any user... Will be closed.

Changed in tlf (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.