Bug 1280236 - kernel: Unprivileged user can freeze journald [fedora-all]
Summary: kernel: Unprivileged user can freeze journald [fedora-all]
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 23
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1280234
TreeView+ depends on / blocked
 
Reported: 2015-11-11 10:02 UTC by Adam Mariš
Modified: 2015-12-11 19:13 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-12-11 18:18:11 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Adam Mariš 2015-11-11 10:02:04 UTC
This is an automatically created tracking bug!  It was created to ensure
that one or more security vulnerabilities are fixed in affected versions
of Fedora.

For comments that are specific to the vulnerability please use bugs filed
against the "Security Response" product referenced in the "Blocks" field.

For more information see:
http://fedoraproject.org/wiki/Security/TrackingBugs

When submitting as an update, use the fedpkg template provided in the next
comment(s).  This will include the bug IDs of this tracking bug as well as
the relevant top-level CVE bugs.

Please also mention the CVE IDs being fixed in the RPM changelog and the
fedpkg commit message.

NOTE: this issue affects multiple supported versions of Fedora. While only
one tracking bug has been filed, please correct all affected versions at
the same time.  If you need to fix the versions independent of each other,
you may clone this bug as appropriate.

Reproducers, if any, will remain confidential and never be made public, unless done so by the security team.

[bug automatically created by: add-tracking-bugs]

Comment 1 Adam Mariš 2015-11-11 10:02:13 UTC
Use the following template to for the 'fedpkg update' request to submit an
update for this issue as it contains the top-level parent bug(s) as well as
this tracking bug.  This will ensure that all associated bugs get updated
when new packages are pushed to stable.

=====

# bugfix, security, enhancement, newpackage (required)
type=security

# testing, stable
request=testing

# Bug numbers: 1234,9876
bugs=1280234,1280236

# Description of your update
notes=Security fix for 

# Enable request automation based on the stable/unstable karma thresholds
autokarma=True
stable_karma=3
unstable_karma=-3

# Automatically close bugs when this marked as stable
close_bugs=True

# Suggest that users restart after update
suggest_reboot=False

======

Additionally, you may opt to use the bodhi update submission link(s) instead:

https://bodhi.fedoraproject.org/updates/new?type_=security&bugs=1280234,1280236

Comment 2 Josh Boyer 2015-11-11 14:33:55 UTC
Eric, this one seems to be related to CLONE_NEWUSER and mandatory locking.  See https://github.com/systemd/systemd/issues/1822.  Do you have any ideas here?

Comment 3 Eric Biederman 2015-11-11 16:42:17 UTC
It looks like this has been fixed in journald.

The presence of mandatory locking is orthogonal to user namespaces, so fixing this in journald was certainly necessary.

User namespaces in this case only made this issue in journald easier to reproduce.

It is not immediately clear to me if user namespaces should prevent mandatory locking from being set on filesystems.   There are details of it's design that are suggestive either way.  I will dig into it on the kernel side.

Thank you for the heads up.

Comment 4 Josh Boyer 2015-12-11 14:01:25 UTC
Eric, I believe you've approached this from the kernel side with this commit:

https://git.samba.org/jlayton/linux.git/?p=jlayton/linux.git;a=commit;h=95ace75414f312f9a7b93d873f386987b92a5301

is that correct?

FWIW, I think the fix in journald solves the immediate CVE itself, but I wanted to come back and see if we had an approach on the kernel side too.

Comment 5 Eric Biederman 2015-12-11 18:11:58 UTC
Actually it is the previous commit that addresses this.

https://git.samba.org/jlayton/linux.git/?p=jlayton/linux.git;a=commit;h=9e8925b67a809bb27ce4b7d352d67f25cf1d7fc5

I recommend that support for mandatory locking be disabled at compile time for all kernels going forward.

When a file system is mounted in such a way that mandatory locking is enabled any user on that filesystem can enable mandatory locking on one of those files and cause this issue (no user namespaces required).

So either mandatory locking is unused (and we should disable it to reduce attack surface) or there is nothing we can do from the kernel side.

Comment 6 Josh Boyer 2015-12-11 18:18:11 UTC
Hm... I guess we can try that in rawhide once it lands in Linus' tree.  I suspect people will object, as many don't like the 'nuke from orbit' approach.  Either way, I'm closing this CVE out as CURRENTRELEASE.

Comment 7 Eric Biederman 2015-12-11 19:09:56 UTC
In this case I believe 'nuke from orbit' is appropriate because we are talking about the dark side of a small isolated moon that no one looks at or visits.  So there is no one to care.

Please let me know how the trial goes.

Comment 8 Josh Boyer 2015-12-11 19:13:25 UTC
I will be sure to CC you on any bugs filed from the trial in rawhide ;)


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