Bug 858799 - systemd: invalid pointer use on error path
Summary: systemd: invalid pointer use on error path
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 855861
TreeView+ depends on / blocked
 
Reported: 2012-09-19 17:24 UTC by Florian Weimer
Modified: 2012-12-08 04:35 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-12-08 04:35:20 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.