This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 858799 - systemd: invalid pointer use on error path
systemd: invalid pointer use on error path
Product: Fedora
Classification: Fedora
Component: systemd (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: systemd-maint
Fedora Extras Quality Assurance
Depends On:
Blocks: 855861
  Show dependency treegraph
Reported: 2012-09-19 13:24 EDT by Florian Weimer
Modified: 2012-12-07 23:35 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-12-07 23:35:20 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Florian Weimer 2012-09-19 13:24:13 EDT
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 13:31:22 EDT
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 12:19:40 EST
systemd-195-10.fc18 has been submitted as an update for Fedora 18.
Comment 3 Fedora Update System 2012-12-05 18:15:22 EST
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:
then log in and leave karma (feedback).
Comment 4 Fedora Update System 2012-12-07 23:35:23 EST
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.