Hi,

rpm core dumps when "installing" a rpm[1]:

rpm-3.0.6p7
kern.version=OpenBSD 5.9-beta (GENERIC.MP) #1862: Thu Jan 21 18:48:14 MST 2016

Steps to reproduce:
* mkdir -p /tmp/rpm/var/lib/rpm
* rpm -ivv --ignoreos --ignorearch --nodeps --dbpath /var/lib/rpm --root 
/tmp/rpm /tmp/ovirt-release36.rpm

j.

#0  0x00000a22c6ae489a in thrkill () at <stdin>:2
No locals.
#1  0x00000a22c6adff59 in *_libc_abort () at /usr/src/lib/libc/stdlib/abort.c:52
        mask = 4294967263
        sa = {__sigaction_u = {__sa_handler = 0xe, __sa_sigaction = 0xe}, 
sa_mask = 3334369443, sa_flags = 2594}
#2  0x00000a22c6ac2299 in wrterror (msg=0xa22c6beb398 "use after free", 
p=0xa22efb484a0) at /usr/src/lib/libc/stdlib/malloc.c:283
        iov = {{iov_base = 0xa209d985ae0 <__progname_storage>, iov_len = 3}, 
{iov_base = 0x7f7ffffea990, iov_len = 10}, {iov_base = 0xa22c6beb3a7, iov_len = 
7}, {iov_base = 0xa22c6bec2b0, iov_len = 8}, {iov_base = 0xa22c6beb398, iov_len 
= 14}, {iov_base = 0x7f7ffffea970, iov_len = 14}, {iov_base = 0xa22c6be70a3, 
iov_len = 1}}
        pidbuf = "(9436) in \000\235 \n\000\000,\024\360\306"
        buf = " 0xa22efb484a0\000\271,\024\360\306"
        saved_errno = 2
#3  0x00000a22c6ac386c in validate_junk (p=<optimized out>) at 
/usr/src/lib/libc/stdlib/malloc.c:1235
        r = <optimized out>
        pool = <optimized out>
        byte = 0
        sz = 11144478476442
#4  ofree (p=0xa22efb484a0) at /usr/src/lib/libc/stdlib/malloc.c:1306
        i = 9
        pool = 0xa22f30846c0
        r = <optimized out>
        sz = <optimized out>
#5  0x00000a22c6ac390e in free (ptr=0xa2399bc59c0) at 
/usr/src/lib/libc/stdlib/malloc.c:1340
        saved_errno = 2
#6  0x00000a209d52c3ed in headerFree (h=0xa22fc192700) at 
/home/jirib/openbsd/pobj/rpm-3.0.6/rpm-3.0.6/lib/header.c:985
        i = 3
#7  0x00000a209d524525 in alFree (al=0xa22ab554918) at 
/home/jirib/openbsd/pobj/rpm-3.0.6/rpm-3.0.6/lib/depends.c:111
        i = 0
        r = 0xa
#8  0x00000a209d52643d in rpmtransFree (rpmdep=0xa22ab554900) at 
/home/jirib/openbsd/pobj/rpm-3.0.6/rpm-3.0.6/lib/depends.c:718
        addedPackages = 0xa22ab554918
        availablePackages = 0xa22ab554948
#9  0x00000a209d542cd0 in rpmInstall (rootdir=0xa2399bc55b0 "/tmp/rpm", 
fileArgv=0xa22c38cde80, transFlags=0, interfaceFlags=4, probFilter=3, 
relocations=0x0) at 
/home/jirib/openbsd/pobj/rpm-3.0.6/rpm-3.0.6/lib/rpminstall.c:390
        db = 0xa2391a84c80
        fd = 0xa235b2e3a00
        i = 1
        mode = 514
        rc = -1
        major = 3
        pkgURL = 0xa237b836ce0
        tmppkgURL = 0xa237b836de0
        fileURL = 0xa237b836ce8
        numPkgs = 1
        numTmpPkgs = 0
        numRPMS = 1
        numSRPMS = 0
        numFailed = 1
        h = 0xa22fc192700
        isSource = 0
        rpmdep = 0xa22ab554900
        numConflicts = 286385781
        stopInstall = 0
        notifyFlags = 20
        dbIsOpen = 1
        sourceURL = 0x7f7ffffeab10
        defaultReloc = 0x0
#10 0x00000a209d50d37b in main (argc=10, argv=0x7f7ffffeaee8) at 
/home/jirib/openbsd/pobj/rpm-3.0.6/rpm-3.0.6/rpm.c:1395
        bigMode = MODE_INSTALL
        qva = 0xa209d97d000 <rpmQVArgs>
        ba = 0xa209d97d020 <rpmBArgs>
        QVSource = RPMQV_PACKAGE
        arg = -1
        installFlags = 0
        uninstallFlags = 0
        interfaceFlags = 4
        gotDbpath = 1
        verifyFlags = -86208
        checksigFlags = 0
        timeCheck = 0
        addSign = 0
        specFile = 0x7f7ffffeaf40 "q\260\376\377\177\177"
        tce = 0x1111e675574635ab <error: Cannot access memory at address 
0x1111e675574635ab>
        passPhrase = 0xa209d665798 ""
        cookie = 0x0
        optArg = 0xa237b836770 "/var/lib/rpm"
        pipeChild = 0
        pkg = 0x8 <error: Cannot access memory at address 0x8>
        errString = 0x0
        optCon = 0xa236f598800
        infoCommand = {0xa209d667f3b "--info", 0x0}
        installCommand = {0xa209d667f42 "--install", 0x0}
        ec = 0
        status = -1177988376
        p = {0, 0}
        relocations = 0x0
        numRelocations = 0
        sigTag = 2594
        upgrade = 0
        freshen = 0
        probFilter = 3

[1] http://resources.ovirt.org/pub/yum-repo/ovirt-release36.rpm

Reply via email to