Bug 858799

Summary: systemd: invalid pointer use on error path
Product: [Fedora] Fedora Reporter: Florian Weimer <fweimer>
Component: systemdAssignee: systemd-maint
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: johannbg, lnykryn, metherid, msekleta, notting, plautrba, systemd-maint, vpavlin
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-12-08 04:35:20 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:
Bug Depends On:    
Bug Blocks: 855861    

Description Florian Weimer 2012-09-19 17:24:13 UTC
In shared/strv.c, invalid pointers are used on error paths.  k cannot point before r in strv_copy(), strv_append(), strv_env_merge(), strv_env_set() because k must point within the allocated object (or one element past it).  The compiler is free to assume that k is never less than r.

I have not checked whether GCC makes this optimization, but future versions might in any case.

Comment 1 Lennart Poettering 2012-10-30 17:31:22 UTC
In systemd git all these loops are now replaced by simple strv_free() which should fix the issue.

Comment 2 Fedora Update System 2012-12-05 17:19:40 UTC
systemd-195-10.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/systemd-195-10.fc18

Comment 3 Fedora Update System 2012-12-05 23:15:22 UTC
Package systemd-195-10.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing systemd-195-10.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-19811/systemd-195-10.fc18
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2012-12-08 04:35:23 UTC
systemd-195-10.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.