Bug 1702061

Summary: Broken tarballs – incorrectly generated C code – Invalid read of size 4 in folks_potential_match_potential_match
Product: [Fedora] Fedora Reporter: Christian Stadelmann <fedora>
Component: folksAssignee: Brian Pepple <bdpepple>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 29CC: bdpepple, debarshir, philip
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-27 22:04:32 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:
Attachments:
Description Flags
Diff between tarball and git tag for 0.11.4 upstream release none

Description Christian Stadelmann 2019-04-22 20:56:02 UTC
Description of problem:
The source tarballs used to build folks-0.11.4 contain C files which they should not. The C files have been generated with a buggy version of vala which optimizes array bounds checks away. The broken C code causes memory access violations such as "Invalid read of size 4 in folks_potential_match_potential_match". As the C files exist already, they are not being regenerated with a more recent (less buggy) valac and so they land in the RPM. See this upstream URL for more details: https://gitlab.gnome.org/GNOME/folks/issues/101

Version-Release number of selected component (if applicable):
folks-0.11.4-8.fc29.x86_64

How reproducible:
always

Steps to Reproduce:
1. Have a look at the source tarball
2. Have a look at the source RPM
3. Run any folks application under valgrind

Actual results:
1. Contains C files generated by buggy valac version
2. Contains the C files from the tarball
3. Has memory access bugs caused by buggy valac version

Expected results:
1. Contain no C files (this is an upstream bug)
2. Regenerate the C files from .vala files
3. Have no memory access bugs.

Additional info:
Using the auto-generated tarball from git instead of the official tarball should work around this issue for now. URL: https://gitlab.gnome.org/GNOME/folks/-/archive/0.11.4/folks-0.11.4.tar.bz2

Comment 1 Christian Stadelmann 2019-04-22 21:23:45 UTC
Created attachment 1557268 [details]
Diff between tarball and git tag for 0.11.4 upstream release

I'm unsure whether it is the right way to

* Download the git tag instead of the tarball, then call "./autogen.sh" within the spec file just before the "%configure" line

or

* Delete all the *.c, *.h and possibly some other files too from the tarball. See the attached diff for a potential list of files to be affected.

Comment 2 Christian Stadelmann 2019-04-22 22:00:33 UTC
(In reply to Christian Stadelmann from comment #1)
> * Delete all the *.c, *.h and possibly some other files too from the
> tarball. See the attached diff for a potential list of files to be affected.

Files to be deleted:
*.c: delete [file].c if [file].vala exists
*.h: delete [file].h if [file].vala exists
*.stamp
*.gir
*.vapi for some files (but not all of them?)

It's unclear to me whether this can be fixed downstream at all or whether the tarball is just so horribly broken that the package cannot be rebuilt with a non-broken valac at all.

Comment 3 Ben Cotton 2019-10-31 19:34:39 UTC
This message is a reminder that Fedora 29 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '29'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 29 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 4 Ben Cotton 2019-11-27 22:04:32 UTC
Fedora 29 changed to end-of-life (EOL) status on 2019-11-26. Fedora 29 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.