Description of problem: I am trying to implement program that extracts header from RPM package. I have created rpm that contains only lead + header and tried to run 'rpm -qp' on it and rpm showed double free or corruption error. Version-Release number of selected component: rpm-4.11.2-2.fc20 Additional info: reporter: libreport-2.2.3 backtrace_rating: 4 cmdline: rpm -qp lo.rpm crash_function: rpmReadSignature executable: /usr/bin/rpm kernel: 3.15.10-200.fc20.x86_64 runlevel: N 5 type: CCpp uid: 1000 Truncated backtrace: Thread no. 1 (9 frames) #5 rpmReadSignature at signature.c:245 #6 rpmpkgRead at package.c:529 #7 rpmReadPackageFile at package.c:717 #8 rpmgiReadHeader at rpmgi.c:90 #9 rpmgiLoadReadHeader at rpmgi.c:126 #10 rpmgiNext at rpmgi.c:216 #11 rpmgiShowMatches at query.c:274 #12 rpmcliArgIter at query.c:518 #13 rpmcliQuery at query.c:568
Created attachment 930829 [details] File: backtrace
Created attachment 930830 [details] File: cgroup
Created attachment 930831 [details] File: core_backtrace
Created attachment 930832 [details] File: dso_list
Created attachment 930833 [details] File: environ
Created attachment 930834 [details] File: limits
Created attachment 930835 [details] File: maps
Created attachment 930836 [details] File: open_fds
Created attachment 930837 [details] File: proc_pid_status
Created attachment 930838 [details] File: var_log_messages
Created attachment 930841 [details] rpm package that rpm fails on
Rpm packages must consist of 1) lead 2) signature header (+ padding) 3) main header 4) payload if the package has files Your sample "package" is missing signature header, and as such cannot be read with rpmReadPackageFile(). That it crashes in this case is obviously a nasty bug, fixed now upstream: http://rpm.org/gitweb?p=rpm.git;a=commitdiff;h=0ab486b8e169edbe66870f5ff43f9dd07ffd2655
Thank you, I have realized this yesterday. I think that my RPM has lead and signature header, but it isn't padded and it is missing main header. But still, double freeing memory is a bug.
rpm-4.11.3-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/rpm-4.11.3-1.fc20
Package rpm-4.11.3-1.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing rpm-4.11.3-1.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-10325/rpm-4.11.3-1.fc20 then log in and leave karma (feedback).
rpm-4.11.3-1.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/rpm-4.11.3-1.fc19
rpm-4.11.3-1.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.
rpm-4.11.3-1.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.