Ticket #1764 (closed bug: duplicate)

Opened 2 years ago

Last modified 2 years ago

libtunepimp 0.4.2 buffer overflow

Reported by: kevin.kofler@chello.at Assigned to: rob
Priority: critical Milestone:
Component: libtunepimp Version: libtunepimp 0.4.2
Keywords: Cc: rdieter@math.unl.edu
Browser: OS:

Description

While developing (in a team (CCed) for a university project) and testing a libtunepimp client program, I have found a buffer overflow (actually, 3 buffers can possibly be overflown) in libtunepimp 0.4.2. This bug is promptly detected by the Fedora Core 5 security features, the program is terminated with "*** stack smashing detected ***". Still, it might be exploitable on other systems, possibly including older Fedora releases, so I thought it was better to go through secalert. 3 stack variables are allocated with 255, 255 and 100 bytes respectively, yet 256 bytes are read into each.

Backtrace: Thread 5 (Thread -1247491168 (LWP 13178)):
#0 0x00a4a402 in __kernel_vsyscall ()
#1 0x01b2d069 in raise () from /lib/libc.so.6
#2 0x01b2e671 in abort () from /lib/libc.so.6
#3 0x01b61a4b in __libc_message () from /lib/libc.so.6
#4 0x01be2785 in __stack_chk_fail () from /lib/libc.so.6
#5 0x03360d99 in __stack_chk_fail_local () from /usr/lib/libtunepimp.so.3
#6 0x03343135 in LookupTRM::lookup (this=0xb5a4c1e4) at lookuptools.cpp:205
#7 0x00000000 in ?? ()

I have verified that the attached patch fixes the issue. (The actual and passed buffer sizes now match up, and the program works with no more stack smashing and is fully functional.)

It turns out the 255->256 issue has already been reported, the much more serious 256->100 one hasn't though, and can be a more serious security issue.

I'm not sure if you're still maintaining 0.4.x nor if this affects 0.5.x, but in any case an advisory on the front page would be a good idea. (A fixed package has been pushed into Fedora Extras without waiting due to some misunderstanding, so keeping it secret won't help anyone.)

Attachments

libtunepimp-0.4.2-lookuptools.cpp-fix-buffer-overflow.diff (0.8 kB) - added by kevin.kofler@chello.at on 2006-07-13 00:46:57.
Buffer overflow fix

Change History

2006-07-13 00:46:57 changed by kevin.kofler@chello.at

  • attachment libtunepimp-0.4.2-lookuptools.cpp-fix-buffer-overflow.diff added.

Buffer overflow fix

2006-07-13 01:43:17 changed by rdieter

  • cc set to rdieter@math.unl.edu.

2006-07-16 23:05:08 changed by luks

  • status changed from new to closed.
  • resolution set to duplicate.

This is a duplicate of #1563, and the problem was fixed in [7935].

rob: Do we want to do a new 0.4.x release?

2006-07-16 23:05:20 changed by luks

  • version set to libtunepimp 0.4.2.

Add/Change #1764 (libtunepimp 0.4.2 buffer overflow)




Action