Bug 118957 - rpm segfaults in strcmp when md5sum is accedentally given to rpm -Fvh
rpm segfaults in strcmp when md5sum is accedentally given to rpm -Fvh
Status: CLOSED DEFERRED
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-03-23 02:34 EST by Aleksey Nogin
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-03-23 08:22:13 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Aleksey Nogin 2004-03-23 02:34:01 EST
On a Fedora Core 1 (+ all updates) machine, I d/l'ed all the files
from ftp://ftp.kde.org/pub/kde/stable/3.2.1/RedHat/Fedora/i386 and ran
"rpm -Fvh *" (w/o realizing that I also had an md5sum file in there,
not just the rpms). I saw

...
 warning: package qt-devel = 1:3.3.1-0.2 was already added, replacing
with qt-devel <= 1:3.3.1-0.2
error: open of 74f8b5658fd1f4445aa77d9d758418d2 failed: No such file
or directory
error: open of 057dad60fff85678aa67dd93de7c9250 failed: No such file
or directory
error: open of d4aeb3078a069b0813f2a5b3cc58351c failed: No such file
or directory
warning: package redhat-artwork = 0.93-1 was already added, replacing
with redhat-artwork <= 0.93-1
Segmentation fault (core dumped)

gdb showed:

(gdb) bt
#0  0x00b9bf48 in strcmp () from /lib/tls/libc.so.6
#1  0x00cf6c23 in rpmalFree () from /usr/lib/librpm-4.2.so
#2  0x00b4fa90 in msort_with_tmp () from /lib/tls/libc.so.6
#3  0x00b4fa17 in msort_with_tmp () from /lib/tls/libc.so.6
#4  0x00b4f9f0 in msort_with_tmp () from /lib/tls/libc.so.6
#5  0x00b4f9f0 in msort_with_tmp () from /lib/tls/libc.so.6
#6  0x00b4fcb8 in qsort () from /lib/tls/libc.so.6
#7  0x00cf72f9 in rpmalAdd () from /usr/lib/librpm-4.2.so
#8  0x00cdece2 in rpmtsAddInstallElement () from /usr/lib/librpm-4.2.so
#9  0x00d024a1 in rpmInstall () from /usr/lib/librpm-4.2.so
#10 0x0804b499 in ?? ()
#11 0x098065f8 in ?? ()
#12 0x0805a098 in ?? ()
#13 0x097fc1c8 in ?? ()
#14 0x08059020 in ?? ()

Of course, I should not be giving junk files as arguments to rpm, but
rpm should not be crashing even with junk arguments.
Comment 1 Jeff Johnson 2004-03-23 08:22:13 EST
"Don't do that."
Comment 2 Leonard den Ottolander 2004-04-07 12:41:49 EDT
I'm a bit surprised by the fact you defer issues that cause
segmentation faults. Aren't those are bugs that should be fixed asap?

Note You need to log in before you can comment on or make changes to this bug.