Bug 767795 - systemd-sysctl is inherently racy
Summary: systemd-sysctl is inherently racy
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 16
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michal Sekletar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 760254
TreeView+ depends on / blocked
 
Reported: 2011-12-14 21:48 UTC by Bill Nottingham
Modified: 2014-03-17 03:29 UTC (History)
12 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-10-07 22:49:06 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Bill Nottingham 2011-12-14 21:48:12 UTC
Description of problem:

If a package provides a sysctl file in /usr/lib/sysctl.d, and the admin wants to override some setting in that file, it is racy to do so unless they create a file with the exact same name in /etc/sysctl.d. This should be noted more clearly in the documentation - it is not enough to have a setting that evaluates later, they must override the file itself (and, therefore, all other settings in that file).

To be precise - attempting to override a /usr/lib/sysctl.d setting in /etc/sysctl.conf will always leave a (small) window where the setting is the packaged setting, instead of the overridden setting in /etc/sysctl.conf.

Version-Release number of selected component (if applicable):

systemd-37-3

How reproducible:

100%

Steps to Reproduce:
1. looked at the code

Additional info:

A potential fix would be for systemd-sysctl to read all files, and weed out the duplicate keys so that only the last one applies. This obviously complicates the code.

Comment 1 Michal Sekletar 2012-08-01 14:21:52 UTC
I've prepared the patch, once it is reviewed it should appear in upstream git. Thanks for report.

Comment 2 Michal Schmidt 2012-08-06 16:26:39 UTC
Applied Michal's patch with a few changes:

http://cgit.freedesktop.org/systemd/systemd/commit/?id=86fc77c47f2d22cd01d0871866869cb194af0884

Comment 3 Fedora Update System 2012-09-20 19:56:40 UTC
systemd-190-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/systemd-190-1.fc18

Comment 4 Fedora Update System 2012-09-22 06:37:48 UTC
Package systemd-191-2.fc18, rtkit-0.11-3.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-191-2.fc18 rtkit-0.11-3.fc18'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-14581/rtkit-0.11-3.fc18,systemd-191-2.fc18
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2012-09-28 00:18:19 UTC
Package glibc-2.16-17.fc18, systemd-192-1.fc18, selinux-policy-3.11.1-23.fc18, rtkit-0.11-3.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 glibc-2.16-17.fc18 systemd-192-1.fc18 selinux-policy-3.11.1-23.fc18 rtkit-0.11-3.fc18'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-14581/selinux-policy-3.11.1-23.fc18,rtkit-0.11-3.fc18,systemd-192-1.fc18,glibc-2.16-17.fc18
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2012-10-01 20:11:02 UTC
Package glibc-2.16-17.fc18, rtkit-0.11-3.fc18, systemd-193-1.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 glibc-2.16-17.fc18 rtkit-0.11-3.fc18 systemd-193-1.fc18'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-14581/rtkit-0.11-3.fc18,systemd-193-1.fc18,glibc-2.16-17.fc18
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2012-10-12 16:46:11 UTC
systemd-44-20.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/systemd-44-20.fc17


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