Bug 824120

Summary: Invalid read of size 1
Product: [Fedora] Fedora Reporter: Nikola Pajkovsky <npajkovs>
Component: rpmAssignee: Fedora Packaging Toolset Team <packaging-team>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 17CC: dhoward, ffesti, jnovy, packaging-team, pknirsch, pmatilai
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-05-23 13:21:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Nikola Pajkovsky 2012-05-22 18:59:02 UTC
after calling rpmReadConfigFiles(NULL, NULL); valgrind yells 

==7516== Invalid read of size 1
==7516==    at 0x4C29162: __GI_strlen (mc_replace_strmem.c:391)
==7516==    by 0x55A1BE5: strdup (in /usr/lib64/libc-2.15.so)
==7516==    by 0x4E6AF49: defaultMachine (rpmrc.c:1046)
==7516==    by 0x4E6C615: rpmSetMachine (rpmrc.c:1460)
==7516==    by 0x4E6C91C: rpmRebuildTargetVars.constprop.6 (rpmrc.c:1557)
==7516==    by 0x4E6CF73: rpmReadConfigFiles (rpmrc.c:1776)
==7516==    by 0x4022FC: main (abrt-bodhi.c:330)
==7516==  Address 0x7fff52841d09 is not stack'd, malloc'd or (recently) free'd

all it starts in abrt-bodhi.c:330 which is line contains 

330 int status = rpmReadConfigFiles((const char *) NULL, (const char *) NULL);

http://git.fedorahosted.org/git/?p=libreport.git;a=blob;f=src/plugins/abrt-bodhi.c;h=3275086a0d19659e9f8a25bb297cb05a69179d9f;hb=HEAD#l327

I have slightly modified abrt-bodhi.c, but it's not related to rpm (tested w/o my changes) 

Version-Release number of selected component (if applicable):
rpm is taken from updates-testing repo

[npajkovs@f17-virt libreport]$ rpm -q rpm
rpm-4.9.1.3-7.fc17.x86_64

Comment 1 Panu Matilainen 2012-05-23 13:21:30 UTC
This is a valgrind anomaly (or false positive if you like) triggered by rpm now reading /proc/self/auxv, see https://bugs.kde.org/show_bug.cgi?id=253519